summaryrefslogtreecommitdiff
path: root/pactest/tests/sync993.py
diff options
context:
space:
mode:
authorBryan Ischo <bji-keyword-pacman.3644cb@www.ischo.com>2009-03-09 09:56:13 +1300
committerDan McGee <dan@archlinux.org>2009-04-11 14:39:24 -0500
commitdb3e166503386b4f9e456017fd56d8bce84528fe (patch)
tree6be74c28ff430128c8a1a7a3064e32d3fe49d5ec /pactest/tests/sync993.py
parentd70465decc617412db0670c8169ec22421c8e3d1 (diff)
downloadpacman-db3e166503386b4f9e456017fd56d8bce84528fe.tar.xz
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>
Diffstat (limited to 'pactest/tests/sync993.py')
-rw-r--r--pactest/tests/sync993.py20
1 files changed, 20 insertions, 0 deletions
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")