makepkg: Allow "static library" to be translated

Signed-off-by: Allan McRae <allan@archlinux.org>
makepkg: only remove static libraries if they have a shared version

It is fairly common that packages contain static libraries with no
shared counterpart.  These should not be removed with !staticlibs.

Signed-off-by: Allan McRae <allan@archlinux.org>
version: fix formatting in file to RPM upstream

This reverts a portion of 86eefc1a3a341.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
Use title case for a heading in HACKING; fix capitalization of "Vim" in HACKING

Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Allan McRae <allan@archlinux.org>
Remove spaces between the opening "if" and the opening parenthesis

Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Allan McRae <allan@archlinux.org>
support ALPM_SIG_USE_DEFAULT for file siglevels

This brings file siglevels in line with how db siglevels are handled.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
alpm_handle: store lock file descriptor

There was a brief window between opening the file descriptor and
creating a stream to it.  If the process was interrupted during that
window the lock file would not be removed correctly.

The pid is no longer printed to the lock file as this was virtually
meaningless for lock files on NFS.

Fixes FS#35603

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Return zero from extract_file with local source file

The call to bsdtar to check if a file needs extracted returns 1 if it does
not.  We then propegate this return value accidentally which can cause
makepkg to report an error later on.  Explicitly return 0 in this case.

Signed-off-by: Allan McRae <allan@archlinux.org>
makepkg: move update_pkgver out of extract_sources

The extract_sources function should be just extracting sources.

Signed-off-by: Allan McRae <allan@archlinux.org>
Ignore makedepend and checkdepend entries when parsing .PKGINFO file

Signed-off-by: Allan McRae <allan@archlinux.org>
Makefile.am: fix typo in LOG_DRIVER variable

Self-executing tests were not being run through the tap log driver.
This caused `make check` to ignore discrepancies between the expected
number of tests and the actual number of tests.

Also, fix some uncommented output from test scripts that could confuse
TAP parsers.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
log important events from the backend

This ensures that important events will be logged and consistent
regardless of the frontend.  The need for global context in the event
callback is also removed.  The event is logged before any post_* scripts
run, so this also moves the post_* script output underneath the event in
the log.

Fixes FS#36504

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Fix minor grammatical issues in doc/index.txt

Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Allan McRae <allan@archlinux.org>
Fix whitespace and other formatting issues

This commit:
-- replaces space-based indents with tabs per the coding standards
-- removes extraneous whitespace (e.g. extra spaces between function args)
-- adds missing braces for a one-line if statement

Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Fix typo in pacman-optimize

Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Allan McRae <allan@archlinux.org>
Replace "echo" command with "printf" in human_to_size_test.sh

Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Allan McRae <allan@archlinux.org>
Improve --help switch output for pacman contrib and pacman scripts

Unify the formatting of the --help switch for pacman utils, if it exists.
All of the pacman utils will now output help text using the following
format:

  util-name (pacman) v<pacman version>

  one line description of util's purpose

  Usage: util-name [options]

    -b, --bar      whatever --bar does
    -f, --foo      whatever --foo does
    -h, --help     display this help message

Reported-by: Karol Błażewicz <karol.blazewicz at gmail.com>
Signed-off-by: Jason St. John <jstjohn@purdue.edu>