index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Andrew Gregory <andrew.gregory.8@gmail.com> | 2018-11-16 19:47:30 -0800 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2018-12-10 11:12:06 +1000 |
commit | f28ddd9d93ba5e16848cc2ed85a38cec4d2f2b65 (patch) | |
tree | bd45b81e79647c5a9510571e27b1b5d915ef43ae /lib/libalpm | |
parent | 9f1b735d76d04665d6324e723e163a52ca27567c (diff) |
-rw-r--r-- | lib/libalpm/add.c | 2 |
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index 5a3e06b8..e415bb17 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -427,7 +427,7 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg, ASSERT(trans != NULL, return -1); /* see if this is an upgrade. if so, remove the old package first */ - if((oldpkg = newpkg->oldpkg)) { + if(_alpm_db_get_pkgfromcache(db, newpkg->name) && (oldpkg = newpkg->oldpkg)) { int cmp = _alpm_pkg_compare_versions(newpkg, oldpkg); if(cmp < 0) { log_msg = "downgrading"; |