Prevent makepkg creating armored signatures

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>
Do not remove source code references in PO/POT files

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>
makepkg: Fix typo in variable name

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>
makepkg: remove unneeded "|| true"

makepkg only aborts on errors during PKGBUILD functions so the remaining
"|| true" statements are unneeded.

Signed-off-by: Allan McRae <allan@archlinux.org>
Give groups display text singular and plural forms

Reported on transifex

Signed-off-by: Allan McRae <allan@archlinux.org>
pmrule: add FILE_EMPTY rule

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>
pmtest: add memory check to tests with valgrind

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
alpm: export *_free functions

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>
pactree: removed 'provision' from linear output

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_sync_prepare: fix unresolvable packages leak

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>
Check if a file is in the package's file list before extracting

Signed-off-by: Florian Pritz <bluewind@xinu.at>
util: Add _alpm_realloc() and _alpm_greedy_grow()

These will be used in the following patches.

Signed-off-by: Florian Pritz <bluewind@xinu.at>
be_package: Refactor handling of simple path checks

This is used to deduplicate code when using the mtree as the file list
source.

Signed-off-by: Florian Pritz <bluewind@xinu.at>
be_package: Refactor code adding a file to the files list

Signed-off-by: Florian Pritz <bluewind@xinu.at>
be_package: Build the file list from MTREE if possible

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_local: Use alpm_greedy_grow

Signed-off-by: Florian Pritz <bluewind@xinu.at>
Update the event callback

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>
Remove log_cb, add ALPM_EVENT_LOG instead

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>
Add events ALPM_EVENT_RETRIEVE_{DONE, FAILED}

To go along with RETRIEVE_START, one other event will be emmitted once
the downloads are done: RETRIEVE_DONE if all files were successfully
downloaded, else RETRIEVE_FAILED.

Signed-off-by: Olivier Brunel <jjk@jjacky.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Add events _PKGDOWNLOAD_{START, DONE, FAILED}

These will be emmitted when download a package file from a repository,
indicating that the download starts, and whether it was successfull or
not.

Note that when multiple servers are available, no event is emmitted when
switching to another server.

(This doesn't apply to alpm_fetch_pkgurl(), but since it is called by
the frontend, it shouldn't have problems knowing when the download
starts and when it ends.)

Signed-off-by: Olivier Brunel <jjk@jjacky.com>
Signed-off-by: Allan McRae <allan@archlinux.org>