Do not refer to FlySpray numbers

These references to bug numbers assume we will forever be using that bug
tracker. It is better to properly comment the code instead (which was
done in almost all cases anyway).

Signed-off-by: Allan McRae <allan@archlinux.org>
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>
check.c: break backup file search loop after match

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
makepkg: allow make-style environment var overrides

This allows for VAR=value and VAR+=value variable declarations.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
doc/repo-add: Add note on when signatures are added to the db

Signed-off-by: Olivier Brunel <i.am.jack.mail@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
conflict.c: fix directory ownership check

* append "/" to directories before searching package file lists
* use lstat over stat so symlinks aren't resolved
* fix the inverted check for stat's return value

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Store fgetc output as an int.

Bug exposed on ARM when char is unsigned resulting in the comparison
to EOF always failing.

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