[pacman-dev] CVS update of pacman-lib/pactest (pmdb.py tests/sync131.py)

Aaron Griffin aaron at archlinux.org
Mon Feb 26 03:33:48 EST 2007


    Date: Monday, February 26, 2007 @ 03:33:48
  Author: aaron
    Path: /home/cvs-pacman/pacman-lib/pactest

Modified: pmdb.py (1.3 -> 1.4) tests/sync131.py (1.1 -> 1.2)

* 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


------------------+
 pmdb.py          |    2 ++
 tests/sync131.py |   11 +++++------
 2 files changed, 7 insertions(+), 6 deletions(-)


Index: pacman-lib/pactest/pmdb.py
diff -u pacman-lib/pactest/pmdb.py:1.3 pacman-lib/pactest/pmdb.py:1.4
--- pacman-lib/pactest/pmdb.py:1.3	Mon Feb 26 03:19:02 2007
+++ pacman-lib/pactest/pmdb.py	Mon Feb 26 03:33:48 2007
@@ -251,6 +251,8 @@
             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:
Index: pacman-lib/pactest/tests/sync131.py
diff -u pacman-lib/pactest/tests/sync131.py:1.1 pacman-lib/pactest/tests/sync131.py:1.2
--- pacman-lib/pactest/tests/sync131.py:1.1	Sun Oct 15 15:04:31 2006
+++ pacman-lib/pactest/tests/sync131.py	Mon Feb 26 03:33:48 2007
@@ -2,18 +2,17 @@
 
 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")




More information about the pacman-dev mailing list