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>
[FIXME] Extend database upgrade script to handle alpm db version 9

Signed-off-by: Allan McRae <allan@archlinux.org>
Display old and new version in pacman -Qu output

This changes the output from "foo 1.0" to "foo 1.0 -> 1.1" which makes
cronjobs that mail the -Qu output way more helpful.

Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Allan McRae <allan@archlinux.org>
Add make target for TESTS

This causes make to update TESTS when tests are added (or updated).
For simplicity, this changes TESTS from a single multi-line list to
individually appending each test file.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>

[Allan: use C locale for sorting]
Signed-off-by: Allan McRae <allan@archlinux.org>
Clarify --repackage description

Signed-off-by: Allan McRae <allan@archlinux.org>
Use $srcdir/ rather than src/ in makepkg help

Signed-off-by: Allan McRae <allan@archlinux.org>
Remove makepkg license check

There is little reason for this field to be checked over all other
fields.

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