Create local database directory if it is missing

This means that a missing local database becomes an error (as it
should be immediately created).  Note this only creates the "local"
directory and not its parent, which is check for during locking.

Signed-off-by: Allan McRae <allan@archlinux.org>
Add version file when creating local database directory

The version of the local pacman database is stored in its root in the file
.alpm_db_version.  The version is starting at 9, corresponding to the
next libalpm library version.

Signed-off-by: Allan McRae <allan@archlinux.org>
Add version file to empty local database

If a user manually creates the local database directory, or has an empty
local database for some other reason, we silently add a version file

Signed-off-by: Allan McRae <allan@archlinux.org>
Check the version of the local database during validation

Signed-off-by: Allan McRae <allan@archlinux.org>
Extend database upgrade script to handle alpm db version 9

Signed-off-by: Allan McRae <allan@archlinux.org>
Provide a mechanism to skip validation of sync repos

We often know when we initially register a sync database that it is scheduled
to be updated.  In particular, if the current copy of the sync database is
invalid but we are refreshing it, there is no need to output error messages
before updating.

Signed-off-by: Allan McRae <allan@archlinux.org>
Provide more information for database signature failures

Distinguish between database that failed to verify and that are missing.

Signed-off-by: Allan McRae <allan@archlinux.org>
Report which package is missing a signature

If any package in a sync transaction is missing a required signature,
we give an uninformative error message (which may or may not state that
the missing signature is the issue).  Always output the package with
the missing signature.

Signed-off-by: Allan McRae <allan@archlinux.org>
alpm: log errors for scriptlets terminated by a signal

Fixes FS#36618.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
makepkg.8: fix typo in usage

Looks like I fat fingered something when I refactored the original
submissions. Woops.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>