summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2007-02-26 08:33:48 +0000
committerAaron Griffin <aaron@archlinux.org>2007-02-26 08:33:48 +0000
commit52376150fa267f4f69af75cb9ff4a720430a5083 (patch)
tree523f277e1b57d4f403e0a187ed995d2c06a3cf48
parent25223d679078dc756bbd8aea46f713259a4365ee (diff)
downloadpacman-52376150fa267f4f69af75cb9ff4a720430a5083.tar.xz
* Writing 'replaces' info to both /desc and /depends files for testing - see the
"replaces confusion" thread on pacman-dev for more information * Cleaned up some 2 item loops in the sync131 test
-rwxr-xr-xpactest/pmdb.py2
-rw-r--r--pactest/tests/sync131.py11
2 files changed, 7 insertions, 6 deletions
diff --git a/pactest/pmdb.py b/pactest/pmdb.py
index 29d35ba1..ba707bd8 100755
--- a/pactest/pmdb.py
+++ b/pactest/pmdb.py
@@ -251,6 +251,8 @@ class pmdb:
if pkg.reason:
data.append(_mksection("REASON", pkg.reason))
else:
+ if pkg.replaces:
+ data.append(_mksection("REPLACES", pkg.replaces))
if pkg.csize:
data.append(_mksection("CSIZE", pkg.csize))
if pkg.md5sum:
diff --git a/pactest/tests/sync131.py b/pactest/tests/sync131.py
index d0ed1a9f..6d70d609 100644
--- a/pactest/tests/sync131.py
+++ b/pactest/tests/sync131.py
@@ -2,18 +2,17 @@ self.description = "Sysupgrade with a sync package replacing a set of local ones
sp = pmpkg("pkg4")
sp.replaces = ["pkg1", "pkg2", "pkg3"]
-
self.addpkg2db("sync", sp)
lp1 = pmpkg("pkg1")
-lp2 = pmpkg("pkg2")
+self.addpkg2db("local", lp1)
-for p in lp1, lp2:
- self.addpkg2db("local", p)
+lp2 = pmpkg("pkg2")
+self.addpkg2db("local", lp2)
self.args = "-Su"
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg4")
-for p in lp1, lp2:
- self.addrule("!PKG_EXIST=%s" % p.name)
+self.addrule("!PKG_EXIST=pkg1")
+self.addrule("!PKG_EXIST=pkg2")