index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | lib/libalpm/sync.c | 14 | ||||
-rw-r--r-- | pactest/tests/sync404.py | 26 |
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index dd54ce6c..ec4af9f4 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -570,12 +570,14 @@ int _alpm_sync_prepare(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sync } if(rmpkg) { pmsyncpkg_t *rsync = _alpm_sync_find(trans->packages, rmpkg); - void *vpkg; - _alpm_log(PM_LOG_DEBUG, "removing '%s' from target list\n", - rsync->pkg->name); - trans->packages = alpm_list_remove(trans->packages, rsync, - syncpkg_cmp, &vpkg); - _alpm_sync_free(vpkg); + if(rsync) { + void *vpkg; + _alpm_log(PM_LOG_DEBUG, "removing '%s' from target list\n", + rsync->pkg->name); + trans->packages = alpm_list_remove(trans->packages, rsync, + syncpkg_cmp, &vpkg); + _alpm_sync_free(vpkg); + } continue; } } diff --git a/pactest/tests/sync404.py b/pactest/tests/sync404.py new file mode 100644 index 00000000..118f9e9d --- /dev/null +++ b/pactest/tests/sync404.py @@ -0,0 +1,26 @@ +self.description = "FS#9024" + +sp = pmpkg("xorg-server") +sp.depends = [ "libgl" ] +self.addpkg2db("sync", sp) + +sp1 = pmpkg("nvidia-utils") +sp1.provides = [ "libgl" ] +sp1.conflicts = [ "libgl", "libgl-dri" ] +self.addpkg2db("sync", sp1) + +sp2 = pmpkg("libgl") +sp2.provides = [ "libgl-dri" ] +self.addpkg2db("sync", sp2) + +sp3 = pmpkg("nvidia") +sp3.depends = [ "nvidia-utils" ] +self.addpkg2db("sync", sp3) + +self.args = "-S xorg-server nvidia" + +self.addrule("PACMAN_RETCODE=0") +self.addrule("PKG_EXIST=xorg-server") +self.addrule("PKG_EXIST=nvidia") +self.addrule("PKG_EXIST=nvidia-utils") +self.addrule("!PKG_EXIST=libgl") |