From db3e166503386b4f9e456017fd56d8bce84528fe Mon Sep 17 00:00:00 2001 From: Bryan Ischo Date: Mon, 9 Mar 2009 09:56:13 +1300 Subject: 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 Signed-off-by: Dan McGee --- pactest/tests/sync993.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 pactest/tests/sync993.py (limited to 'pactest') diff --git a/pactest/tests/sync993.py b/pactest/tests/sync993.py new file mode 100644 index 00000000..82cc803a --- /dev/null +++ b/pactest/tests/sync993.py @@ -0,0 +1,20 @@ +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") -- cgit v1.2.3-24-g4f1b