diff options
author | Dan McGee <dan@archlinux.org> | 2011-02-28 10:46:00 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-02-28 10:46:00 -0600 |
commit | f45369800abdeb54847d9ea6a326eb613f30cd3b (patch) | |
tree | 41ed4f7ae8c9fa18ed60a5b5ca1ccf6d4540bc62 /src/pacman | |
parent | 5ea4706f57e15de23a5fd36eff3bc4619aeac224 (diff) |
Check local DB version before continuing transaction
Ensure we have a local DB version that is up to par with what we expect
before we go down any road that might modify it. This should prevent
stupid mistakes with the 3.5.X upgrade and people not running
pacman-db-upgrade after the transaction as they will need to.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman')
-rw-r--r-- | src/pacman/util.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pacman/util.c b/src/pacman/util.c index c08ebb15..9d50afb2 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -63,6 +63,10 @@ int trans_init(pmtransflag_t flags) fprintf(stderr, _(" if you're sure a package manager is not already\n" " running, you can remove %s\n"), alpm_option_get_lockfile()); } + else if(pm_errno == PM_ERR_DB_VERSION) { + fprintf(stderr, _(" try running pacman-db-upgrade\n")); + } + return(-1); } return(0); |