summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* pacsearch: using pacman color themePierre Neidhardt2014-02-02
| | | | | | | | | | | | | No more per-repo coloring: this was not Arch-agnostic, and there is no reasonable, simple way to color repos in a consistant manner with only 6 colors. 'local' is in red: this way we benefit from the pacman -Ss && pacman -Qs combo. to_color subroutine: it takes an array instead of a string, this is faster and simpler. Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacsearch: colors are portable (ANSI) and have natural variable namesPierre Neidhardt2014-02-02
| | | | | Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacsearch: Explicitly extract group informationPierre Neidhardt2014-02-02
| | | | | | | Also store pkgname and pkgver separately. Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacsearch: localized outputPierre Neidhardt2014-02-02
| | | | | Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacsearch: more accurate help messagePierre Neidhardt2014-02-02
| | | | | Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacsearch: Copyright year bumpPierre Neidhardt2014-02-02
| | | | | Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg.conf(5): Fix and improve grammar and spelling issuesJason St. John2014-02-02
| | | | | Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
* Remove ChangeLog.proto and move important info to PKGBUILD(5)Jason St. John2014-02-02
| | | | | | | The change log prototype should be distribution determined. Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg.conf(5): Add missing backticks around vars, and use single quotes ↵Jason St. John2014-02-02
| | | | | | | around "gpg" command Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
* proto: Remove recommendation of "makepkg -g" in commentsJason St. John2014-02-02
| | | | | | | | This recommendation encouraged the practice of not checking the checksums provided upstream. Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
* Add PKGBUILD-vcs.protoMaxime Gauduin2014-02-02
| | | | | | | | | | | This PKGBUILD proto covers the newly introduced VCS capabilities of pacman. It serves as a replacement for the current bzr, git, hg and svn protos found in ABS. Signed-off-by: Maxime Gauduin <alucryd@gmail.com> [Allan: add to Makefile.am] Signed-off-by: Allan McRae <allan@archlinux.org>
* table_display: free memory on errorsAndrew Gregory2014-01-30
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* _alpm_resolvedeps: free targ inside loopAndrew Gregory2014-01-30
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* sync_prepare: manually set pm_errnoAndrew Gregory2014-01-30
| | | | | | | | | | | _alpm_resolvedeps resets pm_errno to 0 by calling alpm_checkdeps. Whenever the last call succeeded, pm_errno was not properly set, preventing pacman from properly handling the error and leaking additional memory. We know pm_errno should be ALPM_ERR_UNSATISFIED_DEPS if resolvedeps has failed, so just set it manually. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* dump_pkg_full: fix optionalfor memory leakAndrew Gregory2014-01-30
| | | | | | | | alpm_pkg_compute_optional returns a generated list that needs to be free'd. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* local_db_populate: initialize empty pkgcacheAndrew Gregory2014-01-30
| | | | | | | | If the db directory did not exist when local_db_populate was called, the pkgcache wouldn't be initialized, causing pkghash_add_pkg to fail. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Move NULL check before dereferenceSilvan Jegen2014-01-30
| | | | | Signed-off-by: Silvan Jegen <s.jegen@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Another NULL check removedSilvan Jegen2014-01-30
| | | | | Signed-off-by: Silvan Jegen <s.jegen@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Another unneeded NULL check removedSilvan Jegen2014-01-30
| | | | | Signed-off-by: Silvan Jegen <s.jegen@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Remove unneeded NULL checkSilvan Jegen2014-01-30
| | | | | Signed-off-by: Silvan Jegen <s.jegen@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacman: use exit status 0 for --help and --versionAndrew Gregory2014-01-30
| | | | | | | The user requesting usage or version information is not an error. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Consistently use 'directory' instead of 'folder'Allan McRae2014-01-28
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* enable_colors: always set color stringsAndrew Gregory2014-01-28
| | | | | | | | Only setting color strings when colors is true allowed subsequent calls to enable colors but not disable them. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pmtest: use valgrind --child-silent-after-forkAndrew Gregory2014-01-28
| | | | | | | Silences false warnings after alpm forks to run install scripts. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pmtest: use --gen-suppression=all with valgrindAndrew Gregory2014-01-28
| | | | | | | | | Let valgrind do the work of writing any suppression rules needed by the test suite. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* pmtest: send valgrind output to var/log/valgrindAndrew Gregory2014-01-28
| | | | | | | | This will allow us to detect whether valgrind found any errors while still preserving pacman's return code for tests. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* valgrind.supp: add fakeroot/fakechroot errorsAndrew Gregory2014-01-28
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* HACKING: mention tab size and line widthAllan McRae2014-01-28
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Remove ts and sw from vim modeline when noet is setFlorian Pritz2014-01-28
| | | | | | | | | | | | Forcing vim users to view files with a tabstop of 2 seems really unnecessary when noet is set. I find it much easier to read code with ts=4 and I dislike having to override the modeline by hand. Command run: find . -type f -exec sed -i '/vim.* noet/s# ts=2 sw=2##' {} + Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>
* Add missing optdepends to the main list of variables in the split PKGBUILD ↵Jason St. John2014-01-28
| | | | | | | prototype Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacman.c: free string commandline optionsAndrew Gregory2014-01-28
| | | | | | | Plugs a memory leak when values were passed twice. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Rename ALPM_EVENT_OPTDEP_REQUIRED to _OPTDEP_REMOVALOlivier Brunel2014-01-28
| | | | | | | | Because this event is triggered when an optdepend for another package is being removed. Signed-off-by: Olivier Brunel <jjk@jjacky.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacman: Fix delayed warnings/errors sent to stdout not stderrOlivier Brunel2014-01-28
| | | | | Signed-off-by: Olivier Brunel <jjk@jjacky.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacman.c: remove unnecessary optarg checksAndrew Gregory2014-01-28
| | | | | | | | | | getopt takes care of making sure that options that require a value have one. These checks were only added to silence clang, which no longer complains about optarg being unchecked, and newer options already use optarg unchecked. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* sync_prepare: treat from_sync as a booleanAndrew Gregory2014-01-15
| | | | | | | | We only care that packages are being installed from a repo, not how many. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* base64.c: comment out unused variableAndrew Gregory2014-01-15
| | | | | | | | Commit e47eb9a7 commented out base64_encode, which left base64_enc_map unused, causing warnings under clang. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* package.h: convert scriptlet field to intAndrew Gregory2014-01-15
| | | | | | | | It's a boolean, so signedness doesn't matter, and the public API already exposes it as an int through alpm_pkg_has_scriptlet(). Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Consistently use #ifdefAllan McRae2014-01-10
| | | | Fix the occurances of #if to be #ifdef for consistency.
* Fix build with --disable-gpgmeAllan McRae2014-01-10
| | | | | | | | | The alpm_decode_signature function was made available for frontends to display signature information, but this required libalpm to be build with gpgme support. As that function did not require anything from gpgme, have it build unconditionally. Signed-off-by: Allan McRae <allan@archlinux.org>
* Fix compile warnings on systems without getmntentDan McGee2014-01-10
| | | | | Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* Makefile.am: move test-suite.log into test/Andrew Gregory2014-01-10
| | | | | | | | Pushing down the testing .gitignore entries in commit e25afaf6 exposed test-suite.log in the root. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* create_verbose_row: free malloc'd stringsAndrew Gregory2014-01-10
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* check_keyring: plug memory leakAndrew Gregory2014-01-06
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* valgrind.supp: suppress leak in gpgme_get_keyAndrew Gregory2014-01-06
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Reorder and reshape the package struct for better packingDan McGee2014-01-06
| | | | | | | | | This shrinks down the total size of the package struct by a handful of bytes, saving us some memory and cache pressure when we are loading up the entirety of the sync and local databases. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* Minor struct member reordering for packing concernsDan McGee2014-01-06
| | | | | | | Noticed using clang and `-Wpadded`. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* Use O_CLOEXEC as much as possible when opening filesDan McGee2014-01-06
| | | | | | | | | | | | | | | | | | | When calling open(), use O_CLOEXEC as much as possible to ensure the file descriptor is closed when and if a process using libalpm forks. For most of these cases, and especially in utility functions, the file descriptor is opened and closed in the same function, so we don't have too much to worry about. However, for things like the log file and database lock file, we should ensure descriptors aren't left hanging around for children to touch. This patch is inspired by the problem in FS#36161, where an open file descriptor to the current working directory prevents chroot() from working on FreeBSD. We don't need this file descriptor in the child process, so open it (and now several others) with O_CLOEXEC. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* Log more in search debug messageDan McGee2014-01-06
| | | | | Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* Remove -fgnu89-inline from compile optionsDan McGee2014-01-06
| | | | | | | | | This was a hack done by me in commit d8e88aa0175fd back in 2007 that is no longer necessary, given a sufficiently smart compiler and one that supports the inline keyword. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* Push down testing .gitignore entriesDan McGee2014-01-06
| | | | | Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>