1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-11-10 11:35:00 -05:00
pacman/pactest/tests/sync993.py
Bryan Ischo db3e166503 Look in target-list first to resolve dependencies
This fixes a bug introduced by my previous changes which changes the
behavior of IgnorePkg/IgnoreGroup to allow the user to remove unresolvable
packages from the transaction.  The bug is that the target-list was no
longer being consulted first to resolve dependencies, which means that if
two packages in the sync database satisfied a dependency, and the user
explicitly requested one of those two packages in the sync, the other
package was still being pulled in.

A new test was added, sync993.py, to verify the desired behavior.

Signed-off-by: Bryan Ischo <bji-keyword-pacman.3644cb@www.ischo.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-04-11 14:39:24 -05:00

21 lines
424 B
Python

self.description = "Choose a dependency satisfier (target-list vs. database)"
sp1 = pmpkg("pkg1")
sp1.depends = ["dep"]
sp2 = pmpkg("pkg2")
sp2.provides = ["dep"]
sp3 = pmpkg("pkg3")
sp3.provides = ["dep"]
for p in sp1, sp2, sp3:
self.addpkg2db("sync", p)
self.args = "-S pkg1 pkg3"
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg1")
self.addrule("!PKG_EXIST=pkg2")
self.addrule("PKG_EXIST=pkg3")