summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Remove log_cb, add ALPM_EVENT_LOG insteadOlivier Brunel2014-03-03
| | | | | | | | When ALPM emits a log message, it still goes through _alpm_log() but instead of calling a specific log callback, it goes as an event. Signed-off-by: Olivier Brunel <jjk@jjacky.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Update the event callbackOlivier Brunel2014-03-03
| | | | | | | | | | | | Instead of using two void* arguments for all events, we now send one pointer to an alpm_event_t struct. This contains the type of event that was triggered. With this information, the pointer can then be typecasted to the event-specific struct in order to get additional arguments. Signed-off-by: Olivier Brunel <jjk@jjacky.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* be_local: Use alpm_greedy_growFlorian Pritz2014-03-03
| | | | Signed-off-by: Florian Pritz <bluewind@xinu.at>
* be_package: Build the file list from MTREE if possibleFlorian Pritz2014-03-03
| | | | | | | | | | | This greatly speeds up file list generation times by avoiding uncompressing the whole package. pacman -S base with a deliberate file conflict: before: 9.1 seconds after: 2.2 seconds Signed-off-by: Florian Pritz <bluewind@xinu.at>
* be_package: Refactor code adding a file to the files listFlorian Pritz2014-03-03
| | | | Signed-off-by: Florian Pritz <bluewind@xinu.at>
* be_package: Refactor handling of simple path checksFlorian Pritz2014-03-03
| | | | | | | This is used to deduplicate code when using the mtree as the file list source. Signed-off-by: Florian Pritz <bluewind@xinu.at>
* util: Add _alpm_realloc() and _alpm_greedy_grow()Florian Pritz2014-03-03
| | | | | | These will be used in the following patches. Signed-off-by: Florian Pritz <bluewind@xinu.at>
* Check if a file is in the package's file list before extractingFlorian Pritz2014-03-03
| | | | Signed-off-by: Florian Pritz <bluewind@xinu.at>
* _alpm_sync_prepare: fix unresolvable packages leakAndrew Gregory2014-02-08
| | | | | | | | | If the user opted not to remove the unresolvable packages from the transaction, the list was neither free'd nor saved to the transaction to be free'd in trans_release. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pactree: removed 'provision' from linear outputPierre Neidhardt2014-02-04
| | | | | | | | | | | Linear output is especially useful when piped to other commands, e.g. $ pactree -lu pacman | pacman -Qqkk - The above command would previously show errors on packages with provisions. Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* alpm: export *_free functionsAndrew Gregory2014-02-04
| | | | | | | Front-ends should be able to free memory that alpm hands them. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pmtest: add memory check to tests with valgrindAndrew Gregory2014-02-04
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pmrule: add FILE_EMPTY ruleAndrew Gregory2014-02-04
| | | | | | | Succeeds if the specified path is a file and is empty. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Give groups display text singular and plural formsAllan McRae2014-02-04
| | | | | | Reported on transifex Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: remove unneeded "|| true"Allan McRae2014-02-02
| | | | | | | makepkg only aborts on errors during PKGBUILD functions so the remaining "|| true" statements are unneeded. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Fix typo in variable nameAllan McRae2014-02-02
| | | | | | | | | It turns out that you should refer to variables by their actual name... Introduced in commit a521cea9. FS#38414. Signed-off-by: Allan McRae <allan@archlinux.org>
* Do not remove source code references in PO/POT filesRafael Ferreira2014-02-02
| | | | | | | FS#34240. This is useful for translators and has little cost to us since we moved to transifex for translations. Signed-off-by: Allan McRae <allan@archlinux.org>
* Prevent makepkg creating armored signaturesLars Gustäbel2014-02-02
| | | | | | | | | If the user has "armor" in thier gpg.conf, makepkg will create an ascii-armored signature. Use --no-armor in the gpg call to avoid. FS#38503. Signed-off-by: Allan McRae <allan@archlinux.org>
* pacsearch: CLI option to turn off colorsPierre Neidhardt2014-02-02
| | | | | Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* 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>