index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Chantry Xavier <shiningxc@gmail.com> | 2008-01-05 13:09:06 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-01-05 13:47:49 -0600 |
commit | 601a85082d2965174925a85942e9e8a5a0e9f735 (patch) | |
tree | 599daa86533b795e3b130bac6f291ee8f03593f7 | |
parent | 04472f925a09e8760946097afc26a492af309d65 (diff) |
-rw-r--r-- | lib/libalpm/add.c | 5 | ||||
-rw-r--r-- | pactest/tests/upgrade026.py | 2 |
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index f1b310d8..ec49c2a3 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -238,8 +238,13 @@ static int upgrade_remove(pmpkg_t *oldpkg, pmpkg_t *newpkg, pmtrans_t *trans, pm * so this removal operation doesn't kill them */ alpm_list_t *old_noupgrade = alpm_list_strdup(handle->noupgrade); /* old package backup list */ + alpm_list_t *filelist = alpm_pkg_get_files(newpkg); for(b = alpm_pkg_get_backup(newpkg); b; b = b->next) { char *backup = _alpm_backup_file(b->data); + /* safety check (fix the upgrade026 pactest) */ + if(!alpm_list_find_str(filelist, backup)) { + continue; + } _alpm_log(PM_LOG_DEBUG, "adding %s to the NoUpgrade array temporarily\n", backup); handle->noupgrade = alpm_list_add(handle->noupgrade, diff --git a/pactest/tests/upgrade026.py b/pactest/tests/upgrade026.py index 8ad87e3e..8e3ef239 100644 --- a/pactest/tests/upgrade026.py +++ b/pactest/tests/upgrade026.py @@ -14,4 +14,4 @@ self.args = "-U %s" % p.filename() self.addrule("PKG_VERSION=dummy|1.0-2") self.addrule("FILE_PACSAVE=etc/dummy.conf") self.addrule("!FILE_PACNEW=etc/dummy.conf") -self.addrule("FILE_EXIST=etc/dummy.conf") +self.addrule("!FILE_EXIST=etc/dummy.conf") |