Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/pactest/tests
diff options
context:
space:
mode:
Diffstat (limited to 'pactest/tests')
-rw-r--r--pactest/tests/TESTS63
-rw-r--r--pactest/tests/add001.py13
-rw-r--r--pactest/tests/add002.py18
-rw-r--r--pactest/tests/add004.py18
-rw-r--r--pactest/tests/add010.py15
-rw-r--r--pactest/tests/add050.py17
-rw-r--r--pactest/tests/depconflict110.py2
-rw-r--r--pactest/tests/depconflict111.py2
-rw-r--r--pactest/tests/deptest001.py24
-rw-r--r--pactest/tests/fileconflict001.py2
-rw-r--r--pactest/tests/fileconflict002.py2
-rw-r--r--pactest/tests/ldconfig001.py2
-rw-r--r--pactest/tests/mode001.py2
-rw-r--r--pactest/tests/mode002.py12
-rw-r--r--pactest/tests/mode003.py20
-rw-r--r--pactest/tests/query003.py1
-rw-r--r--pactest/tests/reason001.py16
-rw-r--r--pactest/tests/remove001.py5
-rw-r--r--pactest/tests/remove030.py2
-rw-r--r--pactest/tests/remove040.py3
-rw-r--r--pactest/tests/remove041.py2
-rw-r--r--pactest/tests/remove042.py2
-rw-r--r--pactest/tests/remove043.py3
-rw-r--r--pactest/tests/remove045.py3
-rw-r--r--pactest/tests/remove046.py10
-rw-r--r--pactest/tests/remove047.py1
-rw-r--r--pactest/tests/remove048.py10
-rw-r--r--pactest/tests/remove049.py18
-rw-r--r--pactest/tests/remove050.py20
-rw-r--r--pactest/tests/remove051.py20
-rw-r--r--pactest/tests/remove052.py21
-rw-r--r--pactest/tests/requiredby002.py16
-rw-r--r--pactest/tests/requiredby003.py16
-rw-r--r--pactest/tests/requiredby004.py20
-rw-r--r--pactest/tests/requiredby005.py21
-rw-r--r--pactest/tests/requiredby006.py21
-rw-r--r--pactest/tests/smoke001.py2
-rw-r--r--pactest/tests/sync010.py2
-rw-r--r--pactest/tests/sync021.py2
-rw-r--r--pactest/tests/sync031.py19
-rw-r--r--pactest/tests/sync060.py15
-rw-r--r--pactest/tests/sync1000.py2
-rw-r--r--pactest/tests/sync1001.py18
-rw-r--r--pactest/tests/sync1002.py19
-rw-r--r--pactest/tests/sync1003.py17
-rw-r--r--pactest/tests/sync1006.py14
-rw-r--r--pactest/tests/sync1008.py (renamed from pactest/tests/sync1005.py)11
-rw-r--r--pactest/tests/sync1101.py1
-rw-r--r--pactest/tests/sync120.py2
-rw-r--r--pactest/tests/sync133.py2
-rw-r--r--pactest/tests/sync138.py2
-rw-r--r--pactest/tests/sync300.py1
-rw-r--r--pactest/tests/sync301.py4
-rw-r--r--pactest/tests/sync400.py1
-rw-r--r--pactest/tests/sync500.py15
-rw-r--r--pactest/tests/sync501.py18
-rw-r--r--pactest/tests/sync893.py4
-rw-r--r--pactest/tests/sync895.py2
-rw-r--r--pactest/tests/sync896.py2
-rw-r--r--pactest/tests/sync897.py6
-rw-r--r--pactest/tests/sync900.py3
-rw-r--r--pactest/tests/sync901.py3
-rw-r--r--pactest/tests/upgrade005.py (renamed from pactest/tests/add003.py)2
-rw-r--r--pactest/tests/upgrade010.py2
-rw-r--r--pactest/tests/upgrade012.py (renamed from pactest/tests/add011.py)2
-rw-r--r--pactest/tests/upgrade013.py (renamed from pactest/tests/add012.py)2
-rw-r--r--pactest/tests/upgrade014.py (renamed from pactest/tests/add013.py)2
-rw-r--r--pactest/tests/upgrade015.py (renamed from pactest/tests/add020.py)2
-rw-r--r--pactest/tests/upgrade016.py (renamed from pactest/tests/add021.py)2
-rw-r--r--pactest/tests/upgrade032.py19
-rw-r--r--pactest/tests/upgrade052.py1
-rw-r--r--pactest/tests/upgrade053.py1
-rw-r--r--pactest/tests/upgrade054.py1
-rw-r--r--pactest/tests/upgrade055.py3
-rw-r--r--pactest/tests/upgrade056.py4
-rw-r--r--pactest/tests/upgrade057.py2
-rw-r--r--pactest/tests/upgrade058.py3
-rw-r--r--pactest/tests/upgrade059.py2
-rw-r--r--pactest/tests/upgrade060.py1
-rw-r--r--pactest/tests/upgrade061.py1
-rw-r--r--pactest/tests/upgrade070.py (renamed from pactest/tests/add060.py)4
-rw-r--r--pactest/tests/upgrade071.py (renamed from pactest/tests/add040.py)2
-rw-r--r--pactest/tests/upgrade072.py (renamed from pactest/tests/add041.py)2
-rw-r--r--pactest/tests/upgrade073.py (renamed from pactest/tests/add042.py)4
-rw-r--r--pactest/tests/upgrade074.py (renamed from pactest/tests/add046.py)2
-rw-r--r--pactest/tests/upgrade075.py (renamed from pactest/tests/add047.py)2
-rw-r--r--pactest/tests/upgrade076.py (renamed from pactest/tests/requiredby001.py)6
-rw-r--r--pactest/tests/xfercommand001.py2
88 files changed, 264 insertions, 442 deletions
diff --git a/pactest/tests/TESTS b/pactest/tests/TESTS
deleted file mode 100644
index e09a78b9..00000000
--- a/pactest/tests/TESTS
+++ /dev/null
@@ -1,63 +0,0 @@
-TODO: this is really outdated, needs regeneration (after we rename tests)
-
-add001: Install a package
-add002: Install a package (already installed)
-add003: Install a set of packages
-add004: Install a set of the same package at different versions
-add010: Install a package with a filesystem conflict
-add011: Install a package with a filesystem conflict (--force)
-add012: Install two packages with a conflicting file
-add013: Install two packages with a conflicting file (--force)
-add020: Install a package with an existing file
-add021: Install a package with an existing file (new modified)
-add030: Freshen a package
-add031: Freshen a package (installed is newer)
-add032: Freshen a package (installed is newer)
-add040: Install a package with a missing dependency
-add041: Install a package with a missing dependency (nodeps)
-add042: Install a package with cascaded dependencies
-add050: Install a package with a file in NoUpgrade
-add060: Install a package with a file in NoExtract
-query001: Query a package
-remove010: Remove a package, with a file marked for backup
-remove011: Remove a package, with a modified file marked for backup
-remove020: Remove a package, with a file marked for backup (--nosave)
-remove021: Remove a package, with a modified file marked for backup (--nosave)
-smoke001: Install a thousand packages in a single transaction
-sync001: Install a package from a sync db
-sync002: Upgrade a package from a sync db
-sync003: Install a package from a sync db, with a filesystem conflict
-sync010: Install a package from a sync db, with its dependencies
-sync040: Install two targets with a conflict
-sync041: Install two conflicting targets
-sync042: Install a sync package conflicting with a local one
-sync043: Install a sync package conflicting with a local one
-sync050: Install a virtual target (provided by a sync package)
-sync100: Sysupgrade with a newer sync package
-sync101: Sysupgrade with same version for local and sync packages
-sync102: Sysupgrade with a newer local package
-sync103: Sysupgrade with a local package not existing in sync db
-sync110: Sysupgrade of a package pulling new dependencies
-sync120: Sysupgrade of packages in 'IgnorePkg'
-sync130: Sysupgrade with a sync package replacing a local one
-sync131: Sysupgrade with a sync package replacing a set of local ones
-sync132: Sysupgrade with a replacement for a local package out of date
-sync133: Sysupgrade with a sync package replacing a local one in 'IgnorePkg'
-sync134: Sysupgrade with a set of sync packages replacing a set local one
-sync135: Sysupgrade with a set of sync packages replacing a set of local ones
-sync897: System upgrade
-sync898: System upgrade
-sync899: System upgrade
-sync990: Sync a package pulling a dependency conflicting with a target
-sync992: Sync a package pulling a conflicting dependency
-sync999: System upgrade
-upgrade001: Upgrade a package (newer version)
-upgrade002: Upgrade a package (same version)
-upgrade003: Upgrade a package (lesser version)
-upgrade004: Upgrade a package (not installed)
-upgrade010: Upgrade a package, with a file in NoUpgrade
-upgrade020: Upgrade a package, with a file in 'backup' (new modified)
-upgrade021: Upgrade a package, with a file in 'backup' (local modified, new unchanged)
-upgrade022: Upgrade a package, with a file in 'backup' (local and new modified)
-upgrade030: Upgrade packages with various reasons
-upgrade040: file relocation 1
diff --git a/pactest/tests/add001.py b/pactest/tests/add001.py
deleted file mode 100644
index 3dde4061..00000000
--- a/pactest/tests/add001.py
+++ /dev/null
@@ -1,13 +0,0 @@
-self.description = "Install a simple package with two files"
-
-p = pmpkg("dummy")
-p.files = ["bin/dummy",
- "usr/man/man1/dummy.1"]
-self.addpkg(p)
-
-self.args = "-A %s" % p.filename()
-
-self.addrule("PACMAN_RETCODE=0")
-self.addrule("PKG_EXIST=dummy")
-for f in p.files:
- self.addrule("FILE_EXIST=%s" % f)
diff --git a/pactest/tests/add002.py b/pactest/tests/add002.py
deleted file mode 100644
index f6bc91a2..00000000
--- a/pactest/tests/add002.py
+++ /dev/null
@@ -1,18 +0,0 @@
-self.description = "Install an already-installed package"
-
-lp = pmpkg("dummy")
-lp.files = ["bin/dummy",
- "usr/man/man1/dummy.1"]
-self.addpkg2db("local", lp)
-
-p = pmpkg("dummy")
-p.files = ["bin/dummy",
- "usr/man/man1/dummy.1"]
-self.addpkg(p)
-
-self.args = "-A %s" % p.filename()
-
-self.addrule("PACMAN_RETCODE=1")
-self.addrule("!PKG_MODIFIED=dummy")
-for f in lp.files:
- self.addrule("!FILE_MODIFIED=%s" % f)
diff --git a/pactest/tests/add004.py b/pactest/tests/add004.py
deleted file mode 100644
index d0188563..00000000
--- a/pactest/tests/add004.py
+++ /dev/null
@@ -1,18 +0,0 @@
-self.description = "Install three of the same package at different versions"
-
-p1 = pmpkg("dummy", "1.0-2")
-p1.files = ["bin/dummy"]
-p2 = pmpkg("dummy", "2.0-1")
-p2.files = ["bin/dummy"]
-p3 = pmpkg("dummy")
-p3.files = ["bin/dummy"]
-
-for p in p1, p2, p3:
- self.addpkg(p)
-
-self.args = "-A %s" % " ".join([p.filename() for p in p1, p2, p3])
-
-self.addrule("PACMAN_RETCODE=0")
-self.addrule("PKG_VERSION=dummy|2.0-1")
-for f in p2.files:
- self.addrule("FILE_EXIST=%s" % f)
diff --git a/pactest/tests/add010.py b/pactest/tests/add010.py
deleted file mode 100644
index a7874746..00000000
--- a/pactest/tests/add010.py
+++ /dev/null
@@ -1,15 +0,0 @@
-self.description = "Install a package with a filesystem conflict"
-
-p = pmpkg("dummy")
-p.files = ["bin/dummy",
- "usr/man/man1/dummy.1"]
-self.addpkg(p)
-
-self.filesystem = ["bin/dummy"]
-
-self.args = "-A %s" % p.filename()
-
-self.addrule("PACMAN_RETCODE=1")
-self.addrule("!PKG_EXIST=dummy")
-self.addrule("!FILE_MODIFIED=bin/dummy")
-self.addrule("!FILE_EXIST=usr/man/man1/dummy.1")
diff --git a/pactest/tests/add050.py b/pactest/tests/add050.py
deleted file mode 100644
index b48459ab..00000000
--- a/pactest/tests/add050.py
+++ /dev/null
@@ -1,17 +0,0 @@
-self.description = "Install a package with a file in NoUpgrade"
-
-p = pmpkg("dummy")
-p.files = ["etc/dummy.conf"]
-p.backup = ["etc/dummy.conf"]
-self.addpkg(p)
-
-self.filesystem = ["etc/dummy.conf"]
-
-self.option["noupgrade"] = ["etc/dummy.conf"]
-
-self.args = "-Af %s" % p.filename()
-
-self.addrule("PACMAN_RETCODE=0")
-self.addrule("PKG_EXIST=dummy")
-self.addrule("!FILE_MODIFIED=etc/dummy.conf")
-self.addrule("FILE_PACNEW=etc/dummy.conf")
diff --git a/pactest/tests/depconflict110.py b/pactest/tests/depconflict110.py
index 2e326f52..fd56fa89 100644
--- a/pactest/tests/depconflict110.py
+++ b/pactest/tests/depconflict110.py
@@ -7,7 +7,7 @@ self.addpkg(p);
lp = pmpkg("pkg2", "1.0-1")
self.addpkg2db("local", lp)
-self.args = "-A %s" % p.filename()
+self.args = "-U %s" % p.filename()
self.addrule("PACMAN_RETCODE=1")
self.addrule("!PKG_EXIST=pkg1")
self.addrule("PKG_EXIST=pkg2")
diff --git a/pactest/tests/depconflict111.py b/pactest/tests/depconflict111.py
index 6f95733b..0d11dd92 100644
--- a/pactest/tests/depconflict111.py
+++ b/pactest/tests/depconflict111.py
@@ -7,7 +7,7 @@ self.addpkg(p);
lp = pmpkg("pkg2", "1.0-1")
self.addpkg2db("local", lp)
-self.args = "-A %s" % p.filename()
+self.args = "-U %s" % p.filename()
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg1")
self.addrule("PKG_EXIST=pkg2")
diff --git a/pactest/tests/deptest001.py b/pactest/tests/deptest001.py
index db0b7684..18569bea 100644
--- a/pactest/tests/deptest001.py
+++ b/pactest/tests/deptest001.py
@@ -1,20 +1,16 @@
self.description = "test deptest (-T) functionality"
-sp1 = pmpkg("pkg1")
-sp1.depends = ["dep"]
-self.addpkg2db("sync", sp1)
+lp1 = pmpkg("pkg1")
+self.addpkg2db("local", lp1)
-sp1dep = pmpkg("dep")
-self.addpkg2db("sync", sp1dep)
+lp3 = pmpkg("pkg3", "2.0-1")
+lp3.provides = ("prov=3.0")
+self.addpkg2db("local", lp3)
-sp2 = pmpkg("pkg2")
-self.addpkg2db("sync", sp2)
-
-lp2 = pmpkg("pkg2")
-self.addpkg2db("local", lp2)
-
-self.args = "-T pkg1 pkg2"
+self.args = "-T pkg1 pkg2 pkg3\>2.1 prov\>\=3.0"
self.addrule("PACMAN_RETCODE=127")
-self.addrule("PACMAN_OUTPUT=pkg1")
-self.addrule("!PACMAN_OUTPUT=pkg2")
+self.addrule("!PACMAN_OUTPUT=pkg1")
+self.addrule("PACMAN_OUTPUT=pkg2")
+self.addrule("PACMAN_OUTPUT=pkg3")
+self.addrule("!PACMAN_OUTPUT=prov")
diff --git a/pactest/tests/fileconflict001.py b/pactest/tests/fileconflict001.py
index 8aca9a0a..4c2069ee 100644
--- a/pactest/tests/fileconflict001.py
+++ b/pactest/tests/fileconflict001.py
@@ -13,7 +13,7 @@ p2 = pmpkg("pkg2")
p2.files = ["dir/symdir/file"]
self.addpkg(p2)
-self.args = "-A %s" % " ".join([p.filename() for p in p1, p2])
+self.args = "-U %s" % " ".join([p.filename() for p in p1, p2])
self.addrule("PACMAN_RETCODE=1")
self.addrule("!PKG_EXIST=pkg1")
diff --git a/pactest/tests/fileconflict002.py b/pactest/tests/fileconflict002.py
index da04e332..c54f6daf 100644
--- a/pactest/tests/fileconflict002.py
+++ b/pactest/tests/fileconflict002.py
@@ -9,7 +9,7 @@ p2 = pmpkg("pkg2")
p2.files = ["dir/symdir/file"]
self.addpkg(p2)
-self.args = "-A %s" % " ".join([p.filename() for p in p1, p2])
+self.args = "-U %s" % " ".join([p.filename() for p in p1, p2])
self.addrule("PACMAN_RETCODE=1")
self.addrule("!PKG_EXIST=pkg1")
diff --git a/pactest/tests/ldconfig001.py b/pactest/tests/ldconfig001.py
index aced413b..9ac2ff35 100644
--- a/pactest/tests/ldconfig001.py
+++ b/pactest/tests/ldconfig001.py
@@ -6,7 +6,7 @@ p = pmpkg("dummy")
self.addpkg(p)
# --debug is necessary to check PACMAN_OUTPUT
-self.args = "--debug -A %s" % p.filename()
+self.args = "--debug -U %s" % p.filename()
self.addrule("PACMAN_RETCODE=0")
self.addrule("PACMAN_OUTPUT=ldconfig")
diff --git a/pactest/tests/mode001.py b/pactest/tests/mode001.py
index ff245a2c..4ec11e10 100644
--- a/pactest/tests/mode001.py
+++ b/pactest/tests/mode001.py
@@ -1,7 +1,7 @@
self.description = "Check the mode of default files in a package"
p = pmpkg("pkg1")
-p.files = ["bin/foo"
+p.files = ["bin/foo",
"bin/bar"]
self.addpkg(p)
diff --git a/pactest/tests/mode002.py b/pactest/tests/mode002.py
new file mode 100644
index 00000000..cc4a8fe8
--- /dev/null
+++ b/pactest/tests/mode002.py
@@ -0,0 +1,12 @@
+self.description = "Check execute mode on files in a package"
+
+p = pmpkg("pkg1")
+p.files = ["bin/foo|755",
+ "bin/bar|755"]
+self.addpkg(p)
+
+self.args = "-U %s" % p.filename()
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("FILE_MODE=bin/foo|755")
+self.addrule("FILE_MODE=bin/bar|755")
diff --git a/pactest/tests/mode003.py b/pactest/tests/mode003.py
new file mode 100644
index 00000000..1193a5cf
--- /dev/null
+++ b/pactest/tests/mode003.py
@@ -0,0 +1,20 @@
+self.description = "Backup file permissions test (same as orig)"
+
+lp = pmpkg("filesystem")
+lp.files = ["etc/profile|666"]
+lp.backup = ["etc/profile*"]
+self.addpkg2db("local", lp)
+
+p = pmpkg("filesystem", "1.0-2")
+p.files = ["etc/profile|666**"]
+p.backup = ["etc/profile"]
+self.addpkg(p)
+
+self.args = "-U %s" % p.filename()
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("!FILE_PACSAVE=etc/profile")
+self.addrule("FILE_PACNEW=etc/profile")
+self.addrule("FILE_EXIST=etc/profile")
+self.addrule("FILE_MODE=etc/profile|666")
+self.addrule("FILE_MODE=etc/profile.pacnew|666")
diff --git a/pactest/tests/query003.py b/pactest/tests/query003.py
index ea113081..41b8a45b 100644
--- a/pactest/tests/query003.py
+++ b/pactest/tests/query003.py
@@ -2,6 +2,7 @@ self.description = "Query search for a package"
p = pmpkg("foobar")
p.files = ["bin/foobar"]
+p.groups = ["group1", "group2"]
self.addpkg2db("local", p)
self.args = "-Qs %s" % p.name
diff --git a/pactest/tests/reason001.py b/pactest/tests/reason001.py
new file mode 100644
index 00000000..40433f5e
--- /dev/null
+++ b/pactest/tests/reason001.py
@@ -0,0 +1,16 @@
+self.description = "Copy reason (to-be-replaced -> replacement)"
+
+sp = pmpkg("libfoo-ng")
+sp.replaces = [ "libfoo" ]
+self.addpkg2db("sync", sp)
+
+lp = pmpkg("libfoo")
+lp.reason = 1
+self.addpkg2db("local", lp)
+
+self.args = "-Su"
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("!PKG_EXIST=libfoo")
+self.addrule("PKG_EXIST=libfoo-ng")
+self.addrule("PKG_REASON=libfoo-ng|1")
diff --git a/pactest/tests/remove001.py b/pactest/tests/remove001.py
index 809bfdb7..d20dd079 100644
--- a/pactest/tests/remove001.py
+++ b/pactest/tests/remove001.py
@@ -1,4 +1,3 @@
-# If someone else can come up with a better name, please do so
self.description = "Remove a package listed 5 times"
p = pmpkg("foo")
@@ -6,5 +5,5 @@ self.addpkg2db("local", p)
self.args = "-R " + "foo "*5
-self.addrule("PACMAN_RETCODE=0")
-self.addrule("!PKG_EXISTS=foo")
+self.addrule("PACMAN_RETCODE=1")
+self.addrule("PKG_EXISTS=foo")
diff --git a/pactest/tests/remove030.py b/pactest/tests/remove030.py
index cc23f144..9e2b9da5 100644
--- a/pactest/tests/remove030.py
+++ b/pactest/tests/remove030.py
@@ -3,7 +3,7 @@ self.description = "Remove a package in HoldPkg"
p1 = pmpkg("dummy")
self.addpkg2db("local", p1)
-self.option["holdpkg"] = ["dummy"]
+self.option["HoldPkg"] = ["dummy"]
self.args = "-R %s" % p1.name
diff --git a/pactest/tests/remove040.py b/pactest/tests/remove040.py
index 07d3e67d..9d95b60e 100644
--- a/pactest/tests/remove040.py
+++ b/pactest/tests/remove040.py
@@ -6,13 +6,10 @@ self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2")
lp2.provides = ["imaginary"]
-lp2.requiredby = [ "pkg1" ]
self.addpkg2db("local", lp2)
-
self.args = "-R %s" % lp1.name
self.addrule("PACMAN_RETCODE=0")
self.addrule("!PKG_EXIST=pkg1")
self.addrule("PKG_EXIST=pkg2")
-self.addrule("!PKG_REQUIREDBY=pkg2|pkg1")
diff --git a/pactest/tests/remove041.py b/pactest/tests/remove041.py
index 9ab7bf74..be27fd4c 100644
--- a/pactest/tests/remove041.py
+++ b/pactest/tests/remove041.py
@@ -2,12 +2,10 @@ self.description = "Remove a no longer needed package (multiple provision)"
lp1 = pmpkg("pkg1")
lp1.provides = ["imaginary"]
-lp1.requiredby = ["pkg3"]
self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2")
lp2.provides = ["imaginary"]
-lp2.requiredby = ["pkg3"]
self.addpkg2db("local", lp2)
lp3 = pmpkg("pkg3")
diff --git a/pactest/tests/remove042.py b/pactest/tests/remove042.py
index 5de1fb41..796d0406 100644
--- a/pactest/tests/remove042.py
+++ b/pactest/tests/remove042.py
@@ -6,10 +6,8 @@ self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2")
lp2.provides = ["imaginary"]
-lp2.requiredby = [ "pkg1" ]
self.addpkg2db("local", lp2)
-
self.args = "-Rc %s" % lp2.name
self.addrule("PACMAN_RETCODE=0")
diff --git a/pactest/tests/remove043.py b/pactest/tests/remove043.py
index a377c58b..0d448d0d 100644
--- a/pactest/tests/remove043.py
+++ b/pactest/tests/remove043.py
@@ -6,13 +6,10 @@ self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2")
lp2.provides = ["imaginary"]
-lp2.requiredby = [ "pkg1" ]
self.addpkg2db("local", lp2)
-
self.args = "-R %s" % lp2.name
self.addrule("!PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg1")
self.addrule("PKG_EXIST=pkg2")
-self.addrule("PKG_REQUIREDBY=pkg2|pkg1")
diff --git a/pactest/tests/remove045.py b/pactest/tests/remove045.py
index d8b7845b..f42e58f2 100644
--- a/pactest/tests/remove045.py
+++ b/pactest/tests/remove045.py
@@ -7,18 +7,15 @@ self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2")
lp2.reason = 1
lp2.depends = ["pkg4"]
-lp2.requiredby = ["pkg1"]
self.addpkg2db("local", lp2)
lp3 = pmpkg("pkg3")
lp3.reason = 1
-lp3.requiredby = ["pkg1", "pkg4"]
self.addpkg2db("local", lp3)
lp4 = pmpkg("pkg4")
lp4.reason = 1
lp4.depends = ["pkg3"]
-lp4.requiredby = ["pkg2"]
self.addpkg2db("local", lp4)
self.args = "-Rs %s" % lp1.name
diff --git a/pactest/tests/remove046.py b/pactest/tests/remove046.py
deleted file mode 100644
index 1ee8be17..00000000
--- a/pactest/tests/remove046.py
+++ /dev/null
@@ -1,10 +0,0 @@
-self.description = "Cascade remove a package with a broken required by"
-
-lp1 = pmpkg("pkg1")
-lp1.requiredby = [ "fake" ]
-self.addpkg2db("local", lp1)
-
-self.args = "-Rc %s" % lp1.name
-
-self.addrule("PACMAN_RETCODE=0")
-self.addrule("!PKG_EXIST=pkg1")
diff --git a/pactest/tests/remove047.py b/pactest/tests/remove047.py
index 9606c2e3..8bb1a63a 100644
--- a/pactest/tests/remove047.py
+++ b/pactest/tests/remove047.py
@@ -1,7 +1,6 @@
self.description = "Remove a package required by other packages"
lp1 = pmpkg("pkg1")
-lp1.requiredby = ["pkg2", "pkg3", "pkg4"]
self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2")
diff --git a/pactest/tests/remove048.py b/pactest/tests/remove048.py
deleted file mode 100644
index 2d9b4803..00000000
--- a/pactest/tests/remove048.py
+++ /dev/null
@@ -1,10 +0,0 @@
-self.description = "Remove a package with a broken required by"
-
-lp1 = pmpkg("pkg1")
-lp1.requiredby = [ "dep" ]
-self.addpkg2db("local", lp1)
-
-self.args = "-R %s" % lp1.name
-
-self.addrule("PACMAN_RETCODE=0")
-self.addrule("!PKG_EXIST=pkg1")
diff --git a/pactest/tests/remove049.py b/pactest/tests/remove049.py
new file mode 100644
index 00000000..a0336295
--- /dev/null
+++ b/pactest/tests/remove049.py
@@ -0,0 +1,18 @@
+self.description = "-Ru test"
+
+lp1 = pmpkg("pkg1")
+self.addpkg2db("local", lp1)
+
+lp2 = pmpkg("pkg2")
+self.addpkg2db("local", lp2)
+
+lp3 = pmpkg("pkg3")
+lp3.depends = [ "pkg1" ]
+self.addpkg2db("local", lp3)
+
+self.args = "-Ru pkg1 pkg2"
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("PKG_EXIST=pkg1")
+self.addrule("!PKG_EXIST=pkg2")
+self.addrule("PKG_EXIST=pkg3") \ No newline at end of file
diff --git a/pactest/tests/remove050.py b/pactest/tests/remove050.py
new file mode 100644
index 00000000..44b0d18c
--- /dev/null
+++ b/pactest/tests/remove050.py
@@ -0,0 +1,20 @@
+self.description = "-Rs test (exclude explicit)"
+
+lp1 = pmpkg("pkg1")
+lp1.depends = ["pkg2" , "pkg3"]
+self.addpkg2db("local", lp1)
+
+lp2 = pmpkg("pkg2")
+lp2.reason = 1
+self.addpkg2db("local", lp2)
+
+lp3 = pmpkg("pkg3")
+lp3.reason = 0
+self.addpkg2db("local", lp3)
+
+self.args = "-Rs %s" % lp1.name
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("!PKG_EXIST=pkg1")
+self.addrule("!PKG_EXIST=pkg2")
+self.addrule("PKG_EXIST=pkg3")
diff --git a/pactest/tests/remove051.py b/pactest/tests/remove051.py
new file mode 100644
index 00000000..bba87bba
--- /dev/null
+++ b/pactest/tests/remove051.py
@@ -0,0 +1,20 @@
+self.description = "-Rss test (include explicit)"
+
+lp1 = pmpkg("pkg1")
+lp1.depends = ["pkg2" , "pkg3"]
+self.addpkg2db("local", lp1)
+
+lp2 = pmpkg("pkg2")
+lp2.reason = 1
+self.addpkg2db("local", lp2)
+
+lp3 = pmpkg("pkg3")
+lp3.reason = 0
+self.addpkg2db("local", lp3)
+
+self.args = "-Rss %s" % lp1.name
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("!PKG_EXIST=pkg1")
+self.addrule("!PKG_EXIST=pkg2")
+self.addrule("!PKG_EXIST=pkg3")
diff --git a/pactest/tests/remove052.py b/pactest/tests/remove052.py
new file mode 100644
index 00000000..df1e0db1
--- /dev/null
+++ b/pactest/tests/remove052.py
@@ -0,0 +1,21 @@
+self.description = "-Rs test (dependency chain)"
+
+lp1 = pmpkg("pkg1")
+lp1.depends = ["pkg2"]
+self.addpkg2db("local", lp1)
+
+lp2 = pmpkg("pkg2")
+lp2.depends = ["pkg3"]
+lp2.reason = 1
+self.addpkg2db("local", lp2)
+
+lp3 = pmpkg("pkg3")
+lp3.reason = 1
+self.addpkg2db("local", lp3)
+
+self.args = "-Rs %s" % " ".join([p.name for p in lp1, lp3])
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("!PKG_EXIST=pkg1")
+self.addrule("!PKG_EXIST=pkg2")
+self.addrule("!PKG_EXIST=pkg3")
diff --git a/pactest/tests/requiredby002.py b/pactest/tests/requiredby002.py
deleted file mode 100644
index 299ec88b..00000000
--- a/pactest/tests/requiredby002.py
+++ /dev/null
@@ -1,16 +0,0 @@
-self.description = "A package was removed with -Rd, then downgraded"
-
-lp1 = pmpkg("pkg1")
-lp1.depends = ["pkg2=1.1"]
-self.addpkg2db("local", lp1)
-
-p = pmpkg("pkg2", "1.0-1")
-self.addpkg(p)
-
-self.args = "-U %s" % p.filename()
-
-self.addrule("PACMAN_RETCODE=0")
-self.addrule("PKG_EXIST=pkg1")
-self.addrule("PKG_VERSION=pkg2|1.0-1")
-self.addrule("PKG_EXIST=pkg2")
-self.addrule("!PKG_REQUIREDBY=pkg2|pkg1")
diff --git a/pactest/tests/requiredby003.py b/pactest/tests/requiredby003.py
deleted file mode 100644
index 3279c2ab..00000000
--- a/pactest/tests/requiredby003.py
+++ /dev/null
@@ -1,16 +0,0 @@
-self.description = "A package was removed with -Rd, then upgraded"
-
-lp1 = pmpkg("pkg1")
-lp1.depends = ["pkg2>=1.1"]
-self.addpkg2db("local", lp1)
-
-p = pmpkg("pkg2", "1.2-1")
-self.addpkg(p)
-
-self.args = "-U %s" % p.filename()
-
-self.addrule("PACMAN_RETCODE=0")
-self.addrule("PKG_EXIST=pkg1")
-self.addrule("PKG_VERSION=pkg2|1.2-1")
-self.addrule("PKG_EXIST=pkg2")
-self.addrule("PKG_REQUIREDBY=pkg2|pkg1")
diff --git a/pactest/tests/requiredby004.py b/pactest/tests/requiredby004.py
deleted file mode 100644
index c4fe7687..00000000
--- a/pactest/tests/requiredby004.py
+++ /dev/null
@@ -1,20 +0,0 @@
-self.description = "Upgrade a package that no longer needs a depend"
-
-lp1 = pmpkg("pkg1")
-lp1.depends = ["pkg2"]
-self.addpkg2db("local", lp1)
-
-lp2 = pmpkg("pkg2")
-lp2.requiredby = ["pkg1"]
-self.addpkg2db("local", lp2)
-
-p = pmpkg("pkg1", "1.1-1")
-self.addpkg(p)
-
-self.args = "-U %s" % p.filename()
-
-self.addrule("PACMAN_RETCODE=0")
-self.addrule("PKG_EXIST=pkg1")
-self.addrule("PKG_VERSION=pkg1|1.1-1")
-self.addrule("PKG_EXIST=pkg2")
-self.addrule("!PKG_REQUIREDBY=pkg2|pkg1")
diff --git a/pactest/tests/requiredby005.py b/pactest/tests/requiredby005.py
deleted file mode 100644
index 5b2ce164..00000000
--- a/pactest/tests/requiredby005.py
+++ /dev/null
@@ -1,21 +0,0 @@
-self.description = "Remove lp1, requiredby should move from lp1 to lp2"
-
-lp1 = pmpkg("foo")
-lp1.requiredby = ["pkg3"]
-self.addpkg2db("local", lp1)
-
-lp2 = pmpkg("pkg2")
-lp2.provides = ["foo"]
-self.addpkg2db("local", lp2)
-
-lp3 = pmpkg("pkg3")
-lp3.depends = ["foo"]
-self.addpkg2db("local", lp3)
-
-
-self.args = "-R %s" % lp1.name
-
-self.addrule("PACMAN_RETCODE=0")
-self.addrule("!PKG_EXIST=foo")
-self.addrule("PKG_EXIST=pkg2")
-self.addrule("PKG_REQUIREDBY=pkg2|pkg3")
diff --git a/pactest/tests/requiredby006.py b/pactest/tests/requiredby006.py
deleted file mode 100644
index ea14cde5..00000000
--- a/pactest/tests/requiredby006.py
+++ /dev/null
@@ -1,21 +0,0 @@
-self.description = "Broken requiredby/depends list"
-
-lp1 = pmpkg("pkg1")
-lp1.depends = ["pkg2"]
-self.addpkg2db("local", lp1)
-
-lp2 = pmpkg("pkg2")
-lp2.requiredby = ["foo", "pkg1"]
-self.addpkg2db("local", lp2)
-
-p = pmpkg("pkg1", "1.1-1")
-p.depends = ["pkg2"]
-self.addpkg(p)
-
-self.args = "-U %s" % p.filename()
-
-self.addrule("PACMAN_RETCODE=0")
-self.addrule("PKG_EXIST=pkg1")
-self.addrule("PKG_VERSION=pkg1|1.1-1")
-self.addrule("PKG_EXIST=pkg2")
-self.addrule("PKG_REQUIREDBY=pkg2|pkg1")
diff --git a/pactest/tests/smoke001.py b/pactest/tests/smoke001.py
index 71a08d3f..c6636391 100644
--- a/pactest/tests/smoke001.py
+++ b/pactest/tests/smoke001.py
@@ -12,7 +12,7 @@ for i in range(1000):
_list = []
[_list.append(p.filename()) for p in self.localpkgs]
-self.args = "-A %s" % " ".join(_list)
+self.args = "-U %s" % " ".join(_list)
self.addrule("PACMAN_RETCODE=0")
#for i in range(1000):
diff --git a/pactest/tests/sync010.py b/pactest/tests/sync010.py
index 7ddc1492..df407a32 100644
--- a/pactest/tests/sync010.py
+++ b/pactest/tests/sync010.py
@@ -25,5 +25,3 @@ for p in sp1, sp2, sp3:
for f in p.files:
self.addrule("FILE_EXIST=%s" % f)
self.addrule("PKG_DEPENDS=dep1|dep2")
-self.addrule("PKG_REQUIREDBY=dep1|dummy")
-self.addrule("PKG_REQUIREDBY=dep2|dep1")
diff --git a/pactest/tests/sync021.py b/pactest/tests/sync021.py
index a4073eed..4c664d8e 100644
--- a/pactest/tests/sync021.py
+++ b/pactest/tests/sync021.py
@@ -12,7 +12,7 @@ sp3.groups = ["grp"]
for p in sp1, sp2, sp3:
self.addpkg2db("sync", p);
-self.option["ignorepkg"] = ["pkg2"]
+self.option["IgnorePkg"] = ["pkg2"]
self.args = "-S grp"
diff --git a/pactest/tests/sync031.py b/pactest/tests/sync031.py
new file mode 100644
index 00000000..4aa2ee39
--- /dev/null
+++ b/pactest/tests/sync031.py
@@ -0,0 +1,19 @@
+self.description = "Sync packages explicitly"
+
+lp1 = pmpkg("pkg1")
+lp1.reason = 1
+self.addpkg2db("local", lp1)
+
+p1 = pmpkg("pkg1", "1.0-2")
+p2 = pmpkg("pkg2", "1.0-2")
+
+for p in p1, p2:
+ self.addpkg2db("sync", p)
+
+self.args = "-S --asexplicit %s" % " ".join([p.name for p in p1, p2])
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("PKG_VERSION=pkg1|1.0-2")
+self.addrule("PKG_VERSION=pkg2|1.0-2")
+self.addrule("PKG_REASON=pkg1|0")
+self.addrule("PKG_REASON=pkg2|0")
diff --git a/pactest/tests/sync060.py b/pactest/tests/sync060.py
deleted file mode 100644
index 45f0c3e0..00000000
--- a/pactest/tests/sync060.py
+++ /dev/null
@@ -1,15 +0,0 @@
-self.description = "Replace a package with a broken required by"
-
-lp1 = pmpkg("pkg1")
-lp1.replaces = [ "pkg2" ]
-self.addpkg2db("sync", lp1)
-
-lp2 = pmpkg("pkg2")
-lp2.requiredby = [ "fake" ]
-self.addpkg2db("local", lp2)
-
-self.args = "-Su"
-
-self.addrule("PACMAN_RETCODE=0")
-self.addrule("PKG_EXIST=pkg1")
-self.addrule("!PKG_EXIST=pkg2")
diff --git a/pactest/tests/sync1000.py b/pactest/tests/sync1000.py
index be1254bf..e7f43263 100644
--- a/pactest/tests/sync1000.py
+++ b/pactest/tests/sync1000.py
@@ -2,11 +2,9 @@
self.description = "stonecrest's problem"
sp = pmpkg("dummy", "1.1-1")
-sp.requiredby = [ "pkg" ]
self.addpkg2db("sync", sp)
lp1 = pmpkg("dummy", "1.0-1")
-lp1.requiredby = [ "pkg" ]
self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg")
diff --git a/pactest/tests/sync1001.py b/pactest/tests/sync1001.py
deleted file mode 100644
index 6c4aabcf..00000000
--- a/pactest/tests/sync1001.py
+++ /dev/null
@@ -1,18 +0,0 @@
-self.description = "Test -Se (ensure specified package is not installed)"
-
-sp1 = pmpkg("dummy")
-sp1.depends = [ "dep1", "dep2" ]
-self.addpkg2db("sync", sp1)
-
-sp2 = pmpkg("dep1")
-self.addpkg2db("sync", sp2)
-
-sp3 = pmpkg("dep2")
-self.addpkg2db("sync", sp3)
-
-self.args = "-Se dummy"
-
-self.addrule("PACMAN_RETCODE=0")
-self.addrule("PKG_EXIST=dep1")
-self.addrule("PKG_EXIST=dep2")
-self.addrule("!PKG_EXIST=dummy")
diff --git a/pactest/tests/sync1002.py b/pactest/tests/sync1002.py
deleted file mode 100644
index c158838b..00000000
--- a/pactest/tests/sync1002.py
+++ /dev/null
@@ -1,19 +0,0 @@
-self.description = "Test -Se (resolve the dependencies' dependencies )"
-
-sp1 = pmpkg("pkg1")
-sp1.depends = [ "pkg2" ]
-self.addpkg2db("sync", sp1)
-
-sp2 = pmpkg("pkg2")
-sp2.depends = [ "pkg3" ]
-self.addpkg2db("sync", sp2)
-
-sp3 = pmpkg("pkg3")
-self.addpkg2db("sync", sp3)
-
-self.args = "-Se pkg1 pkg3"
-
-self.addrule("PACMAN_RETCODE=0")
-self.addrule("PKG_EXIST=pkg2")
-self.addrule("PKG_EXIST=pkg3")
-self.addrule("!PKG_EXIST=pkg1")
diff --git a/pactest/tests/sync1003.py b/pactest/tests/sync1003.py
index 3fd9799d..cd980637 100644
--- a/pactest/tests/sync1003.py
+++ b/pactest/tests/sync1003.py
@@ -4,23 +4,18 @@ sp1 = pmpkg("pkg1", "1.0-2")
sp1.replaces = [ "pkg2" ]
self.addpkg2db("sync", sp1)
-sp2 = pmpkg("pkg2", "1.0-2")
-self.addpkg2db("sync", sp2)
-
-sp3 = pmpkg("pkg3", "1.0-2")
-sp3.depends = ["pkg2=1.0-2"]
-self.addpkg2db("sync", sp3)
-
-lp1 = pmpkg("pkg1", "1.0-1")
-self.addpkg2db("local", lp1)
-
-lp2 = pmpkg("pkg2", "1.0-2")
+lp2 = pmpkg("pkg2", "1.0-1")
self.addpkg2db("local", lp2)
lp3 = pmpkg("pkg3", "1.0-1")
+lp3.depends = [ "pkg2=1.0" ]
self.addpkg2db("local", lp3)
self.args = "-Su"
self.addrule("PACMAN_RETCODE=1")
+self.addrule("!PKG_EXIST=pkg1")
self.addrule("PKG_EXIST=pkg2")
+self.addrule("PKG_EXIST=pkg3")
+self.addrule("PKG_VERSION=pkg2|1.0-1")
+self.addrule("PKG_VERSION=pkg3|1.0-1")
diff --git a/pactest/tests/sync1006.py b/pactest/tests/sync1006.py
deleted file mode 100644
index c331f42e..00000000
--- a/pactest/tests/sync1006.py
+++ /dev/null
@@ -1,14 +0,0 @@
-self.description = "Conflicting package names in sync repos (diff versions)"
-
-sp1 = pmpkg("pkg", "1.0-1")
-sp1.provides = [ "provision1" ]
-self.addpkg2db("sync1", sp1)
-
-sp2 = pmpkg("pkg", "2.0-1")
-sp2.provides = [ "provision2" ]
-self.addpkg2db("sync2", sp2)
-
-self.args = "-S provision1 provision2"
-
-self.addrule("PACMAN_RETCODE=1")
-self.addrule("!PKG_EXIST=pkg")
diff --git a/pactest/tests/sync1005.py b/pactest/tests/sync1008.py
index 4fa82478..a6064597 100644
--- a/pactest/tests/sync1005.py
+++ b/pactest/tests/sync1008.py
@@ -1,14 +1,19 @@
self.description = "Conflicting package names in sync repos"
-sp1 = pmpkg("pkg")
+sp1 = pmpkg("cpkg", "1.0-1")
sp1.provides = [ "provision1" ]
self.addpkg2db("sync1", sp1)
-sp2 = pmpkg("pkg")
+sp2 = pmpkg("cpkg", "2.0-1")
sp2.provides = [ "provision2" ]
self.addpkg2db("sync2", sp2)
-self.args = "-S provision1 provision2"
+sp3 = pmpkg("pkg")
+sp3.depends = [ "provision1" , "provision2" ]
+self.addpkg2db("sync1", sp3)
+
+self.args = "-S pkg"
self.addrule("PACMAN_RETCODE=1")
self.addrule("!PKG_EXIST=pkg")
+self.addrule("!PKG_EXIST=cpkg")
diff --git a/pactest/tests/sync1101.py b/pactest/tests/sync1101.py
index ba2ad44f..e3ed0f0f 100644
--- a/pactest/tests/sync1101.py
+++ b/pactest/tests/sync1101.py
@@ -1,6 +1,7 @@
self.description = "Search for package from a sync db"
sp = pmpkg("dummy")
+sp.groups = ["group1", "group2"]
sp.files = ["bin/dummy",
"usr/man/man1/dummy.1"]
self.addpkg2db("sync", sp)
diff --git a/pactest/tests/sync120.py b/pactest/tests/sync120.py
index b8fc6747..994e440e 100644
--- a/pactest/tests/sync120.py
+++ b/pactest/tests/sync120.py
@@ -12,7 +12,7 @@ lp2 = pmpkg("pkg2")
for p in lp1, lp2:
self.addpkg2db("local", p)
-self.option["ignorepkg"] = ["pkg2"]
+self.option["IgnorePkg"] = ["pkg2"]
self.args = "-Su"
diff --git a/pactest/tests/sync133.py b/pactest/tests/sync133.py
index b852a7fc..cea603b8 100644
--- a/pactest/tests/sync133.py
+++ b/pactest/tests/sync133.py
@@ -9,7 +9,7 @@ lp = pmpkg("pkg1")
self.addpkg2db("local", lp)
-self.option["ignorepkg"] = ["pkg1"]
+self.option["IgnorePkg"] = ["pkg1"]
self.args = "-Su"
diff --git a/pactest/tests/sync138.py b/pactest/tests/sync138.py
index 410c7f07..e67c4f46 100644
--- a/pactest/tests/sync138.py
+++ b/pactest/tests/sync138.py
@@ -13,7 +13,7 @@ lp2 = pmpkg("pkg2")
for p in lp1, lp2:
self.addpkg2db("local", p)
-self.option["ignoregroup"] = ["grp"]
+self.option["IgnoreGroup"] = ["grp"]
self.args = "-Su"
diff --git a/pactest/tests/sync300.py b/pactest/tests/sync300.py
index 85fb850d..31b520a8 100644
--- a/pactest/tests/sync300.py
+++ b/pactest/tests/sync300.py
@@ -12,4 +12,3 @@ self.args = "-S %s" % sp1.name
self.addrule("PACMAN_RETCODE=1")
self.addrule("!PKG_EXIST=pkg1")
self.addrule("!PKG_EXIST=pkg2")
-self.addrule("!PKG_REQUIREDBY=pkg2|pkg1")
diff --git a/pactest/tests/sync301.py b/pactest/tests/sync301.py
index e8526b93..96402fc3 100644
--- a/pactest/tests/sync301.py
+++ b/pactest/tests/sync301.py
@@ -16,10 +16,12 @@ self.addpkg2db("local", lp)
lp1 = pmpkg("pkg1", "1.0-1")
self.addpkg2db("local", lp1)
+self.option["SyncFirst"] = ["pacman"]
+
self.args = "-Su"
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pacman")
self.addrule("PKG_VERSION=pacman|1.0-2")
+self.addrule("PKG_VERSION=pkg1|1.0-1")
self.addrule("PKG_EXIST=dep")
-self.addrule("PKG_REQUIREDBY=dep|pacman")
diff --git a/pactest/tests/sync400.py b/pactest/tests/sync400.py
index 2ee1095d..dd6aaf4e 100644
--- a/pactest/tests/sync400.py
+++ b/pactest/tests/sync400.py
@@ -13,7 +13,6 @@ lp1.depends = ["pkg2=1.0-1"]
self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2", "1.0-1")
-lp2.requiredby = [ "pkg1" ]
self.addpkg2db("local", lp2)
self.args = "-S pkg1"
diff --git a/pactest/tests/sync500.py b/pactest/tests/sync500.py
new file mode 100644
index 00000000..ccfffa7c
--- /dev/null
+++ b/pactest/tests/sync500.py
@@ -0,0 +1,15 @@
+self.description = "Install a package from a sync db with NoExtract"
+
+sp = pmpkg("dummy")
+sp.files = ["bin/dummy",
+ "usr/man/man1/dummy.1"]
+self.addpkg2db("sync", sp)
+
+self.option["NoExtract"] = ["usr/man/man1/dummy.1"]
+
+self.args = "-S %s" % sp.name
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("PKG_EXIST=dummy")
+self.addrule("FILE_EXIST=bin/dummy")
+self.addrule("!FILE_EXIST=usr/man/man1/dummy.1")
diff --git a/pactest/tests/sync501.py b/pactest/tests/sync501.py
new file mode 100644
index 00000000..eb826e21
--- /dev/null
+++ b/pactest/tests/sync501.py
@@ -0,0 +1,18 @@
+self.description = "Upgrade a package, with a file in NoUpgrade"
+
+sp = pmpkg("dummy", "1.0-2")
+sp.files = ["etc/dummy.conf"]
+self.addpkg2db("sync", sp)
+
+lp = pmpkg("dummy")
+lp.files = ["etc/dummy.conf"]
+self.addpkg2db("local", lp)
+
+self.option["NoUpgrade"] = ["etc/dummy.conf"]
+
+self.args = "-S %s" % sp.name
+
+self.addrule("PKG_VERSION=dummy|1.0-2")
+self.addrule("!FILE_MODIFIED=etc/dummy.conf")
+self.addrule("FILE_PACNEW=etc/dummy.conf")
+self.addrule("!FILE_PACSAVE=etc/dummy.conf")
diff --git a/pactest/tests/sync893.py b/pactest/tests/sync893.py
index 9420b74c..1c8494a3 100644
--- a/pactest/tests/sync893.py
+++ b/pactest/tests/sync893.py
@@ -15,6 +15,6 @@ self.addpkg2db("local", lp2)
self.args = "-S %s" % " ".join([p.name for p in sp1, sp2])
-self.addrule("PACMAN_RETCODE=0")
+self.addrule("PACMAN_RETCODE=1")
self.addrule("PKG_EXIST=pkg1")
-self.addrule("!PKG_EXIST=pkg2")
+self.addrule("PKG_EXIST=pkg2")
diff --git a/pactest/tests/sync895.py b/pactest/tests/sync895.py
index 03ddc745..1b348c19 100644
--- a/pactest/tests/sync895.py
+++ b/pactest/tests/sync895.py
@@ -6,7 +6,6 @@ self.addpkg2db("sync", sp)
lp1 = pmpkg("pkg1")
lp1.provides = ["foo"]
-lp1.requiredby = ["pkg2"]
self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2")
@@ -19,4 +18,3 @@ self.addrule("PACMAN_RETCODE=1")
self.addrule("PKG_EXIST=pkg1")
self.addrule("PKG_EXIST=pkg2")
self.addrule("!PKG_EXIST=pkg3")
-self.addrule("PKG_REQUIREDBY=pkg1|pkg2")
diff --git a/pactest/tests/sync896.py b/pactest/tests/sync896.py
index 830b7192..a89b5c70 100644
--- a/pactest/tests/sync896.py
+++ b/pactest/tests/sync896.py
@@ -7,7 +7,6 @@ self.addpkg2db("sync", sp)
lp1 = pmpkg("pkg1")
lp1.provides = ["foo"]
-lp1.requiredby = ["pkg2"]
self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2")
@@ -20,4 +19,3 @@ self.addrule("PACMAN_RETCODE=0")
self.addrule("!PKG_EXIST=pkg1")
self.addrule("PKG_EXIST=pkg2")
self.addrule("PKG_EXIST=pkg3")
-self.addrule("PKG_REQUIREDBY=pkg3|pkg2")
diff --git a/pactest/tests/sync897.py b/pactest/tests/sync897.py
index 3cf43929..f7bd3d71 100644
--- a/pactest/tests/sync897.py
+++ b/pactest/tests/sync897.py
@@ -18,7 +18,7 @@ self.addpkg2db("local", lp3)
self.args = "-Su"
-self.addrule("PACMAN_RETCODE=0")
+self.addrule("PACMAN_RETCODE=1")
self.addrule("PKG_EXIST=pkg1")
-self.addrule("!PKG_EXIST=pkg2")
-self.addrule("!PKG_EXIST=pkg3")
+self.addrule("PKG_EXIST=pkg2")
+self.addrule("PKG_EXIST=pkg3")
diff --git a/pactest/tests/sync900.py b/pactest/tests/sync900.py
index f21af06a..16dfee12 100644
--- a/pactest/tests/sync900.py
+++ b/pactest/tests/sync900.py
@@ -6,7 +6,6 @@ sp.conflicts = ["foo"]
self.addpkg2db("sync", sp)
lp = pmpkg("foo")
-lp.requiredby = ["lp1", "lp2"]
self.addpkg2db("local", lp)
lp1 = pmpkg("pkg1")
@@ -23,6 +22,4 @@ self.addrule("PACMAN_RETCODE=0")
self.addrule("!PKG_EXIST=foo")
self.addrule("PKG_EXIST=bar")
self.addrule("PKG_EXIST=pkg1")
-self.addrule("PKG_REQUIREDBY=bar|pkg1")
self.addrule("PKG_EXIST=pkg2")
-self.addrule("PKG_REQUIREDBY=bar|pkg2")
diff --git a/pactest/tests/sync901.py b/pactest/tests/sync901.py
index 423fe42c..bb420b79 100644
--- a/pactest/tests/sync901.py
+++ b/pactest/tests/sync901.py
@@ -6,7 +6,6 @@ self.addpkg2db("sync", sp)
lp = pmpkg("bar")
lp.provides = ["foo"]
lp.conflicts = ["foo"]
-lp.requiredby = ["lp1", "lp2"]
self.addpkg2db("local", lp)
lp1 = pmpkg("pkg1")
@@ -23,6 +22,4 @@ self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=foo")
self.addrule("!PKG_EXIST=bar")
self.addrule("PKG_EXIST=pkg1")
-self.addrule("PKG_REQUIREDBY=foo|pkg1")
self.addrule("PKG_EXIST=pkg2")
-self.addrule("PKG_REQUIREDBY=foo|pkg2")
diff --git a/pactest/tests/add003.py b/pactest/tests/upgrade005.py
index 4f8ae600..0f8c13ef 100644
--- a/pactest/tests/add003.py
+++ b/pactest/tests/upgrade005.py
@@ -14,7 +14,7 @@ p3.files = ["bin/pkg3", "usr/man/man1/pkg3.1"]
for p in p1, p2, p3:
self.addpkg(p)
-self.args = "-A %s" % " ".join([p.filename() for p in p1, p2, p3])
+self.args = "-U %s" % " ".join([p.filename() for p in p1, p2, p3])
self.addrule("PACMAN_RETCODE=0")
for p in p1, p2, p3:
diff --git a/pactest/tests/upgrade010.py b/pactest/tests/upgrade010.py
index 633ef7e4..3d8b21e1 100644
--- a/pactest/tests/upgrade010.py
+++ b/pactest/tests/upgrade010.py
@@ -8,7 +8,7 @@ p = pmpkg("dummy", "1.0-2")
p.files = ["etc/dummy.conf"]
self.addpkg(p)
-self.option["noupgrade"] = ["etc/dummy.conf"]
+self.option["NoUpgrade"] = ["etc/dummy.conf"]
self.args = "-U %s" % p.filename()
diff --git a/pactest/tests/add011.py b/pactest/tests/upgrade012.py
index 5d2ae43f..dba8dc18 100644
--- a/pactest/tests/add011.py
+++ b/pactest/tests/upgrade012.py
@@ -6,7 +6,7 @@ self.addpkg(p)
self.filesystem = ["bin/dummy"]
-self.args = "-Af %s" % p.filename()
+self.args = "-Uf %s" % p.filename()
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=dummy")
diff --git a/pactest/tests/add012.py b/pactest/tests/upgrade013.py
index 291d1fba..5a327599 100644
--- a/pactest/tests/add012.py
+++ b/pactest/tests/upgrade013.py
@@ -13,7 +13,7 @@ p2.files = ["bin/foobar",
for p in p1, p2:
self.addpkg(p)
-self.args = "-A %s" % " ".join([p.filename() for p in p1, p2])
+self.args = "-U %s" % " ".join([p.filename() for p in p1, p2])
self.addrule("PACMAN_RETCODE=1")
self.addrule("!PKG_EXIST=dummy")
diff --git a/pactest/tests/add013.py b/pactest/tests/upgrade014.py
index 547ce001..1632dd36 100644
--- a/pactest/tests/add013.py
+++ b/pactest/tests/upgrade014.py
@@ -13,7 +13,7 @@ p2.files = ["bin/foobar",
for p in p1, p2:
self.addpkg(p)
-self.args = "-Af %s" % " ".join([p.filename() for p in p1, p2])
+self.args = "-Uf %s" % " ".join([p.filename() for p in p1, p2])
self.addrule("PACMAN_RETCODE=0")
for p in p1, p2:
diff --git a/pactest/tests/add020.py b/pactest/tests/upgrade015.py
index 8a2f4a71..22f7c36b 100644
--- a/pactest/tests/add020.py
+++ b/pactest/tests/upgrade015.py
@@ -6,7 +6,7 @@ self.addpkg(p)
self.filesystem = ["etc/dummy.conf"]
-self.args = "-Af %s" % p.filename()
+self.args = "-Uf %s" % p.filename()
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=dummy")
diff --git a/pactest/tests/add021.py b/pactest/tests/upgrade016.py
index a6dda963..dd31c9ab 100644
--- a/pactest/tests/add021.py
+++ b/pactest/tests/upgrade016.py
@@ -7,7 +7,7 @@ self.addpkg(p)
self.filesystem = ["etc/dummy.conf"]
-self.args = "-Af %s" % p.filename()
+self.args = "-Uf %s" % p.filename()
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=dummy")
diff --git a/pactest/tests/upgrade032.py b/pactest/tests/upgrade032.py
new file mode 100644
index 00000000..85e048e0
--- /dev/null
+++ b/pactest/tests/upgrade032.py
@@ -0,0 +1,19 @@
+self.description = "Install packages explicitly"
+
+lp1 = pmpkg("pkg1")
+lp1.reason = 1
+self.addpkg2db("local", lp1)
+
+p1 = pmpkg("pkg1", "1.0-2")
+p2 = pmpkg("pkg2", "1.0-2")
+
+for p in p1, p2:
+ self.addpkg(p)
+
+self.args = "-U --asexplicit %s" % " ".join([p.filename() for p in p1, p2])
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("PKG_VERSION=pkg1|1.0-2")
+self.addrule("PKG_VERSION=pkg2|1.0-2")
+self.addrule("PKG_REASON=pkg1|0")
+self.addrule("PKG_REASON=pkg2|0")
diff --git a/pactest/tests/upgrade052.py b/pactest/tests/upgrade052.py
index 7db85df9..7000a12f 100644
--- a/pactest/tests/upgrade052.py
+++ b/pactest/tests/upgrade052.py
@@ -6,7 +6,6 @@ self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2")
lp2.provides = ["imaginary", "real"]
-lp2.requiredby = [ "pkg1" ]
self.addpkg2db("local", lp2)
p = pmpkg("pkg2", "1.0-2")
diff --git a/pactest/tests/upgrade053.py b/pactest/tests/upgrade053.py
index 4cbaa1f8..78de0b5e 100644
--- a/pactest/tests/upgrade053.py
+++ b/pactest/tests/upgrade053.py
@@ -17,4 +17,3 @@ self.args = "-U %s" % p.filename()
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_VERSION=pkg1|1.0-2")
self.addrule("PKG_EXIST=pkg2")
-self.addrule("PKG_REQUIREDBY=pkg2|pkg1")
diff --git a/pactest/tests/upgrade054.py b/pactest/tests/upgrade054.py
index b60f15f4..817d1b3d 100644
--- a/pactest/tests/upgrade054.py
+++ b/pactest/tests/upgrade054.py
@@ -17,4 +17,3 @@ self.args = "-U %s" % p.filename()
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_VERSION=pkg1|1.0-2")
self.addrule("PKG_EXIST=pkg2")
-self.addrule("PKG_REQUIREDBY=pkg2|pkg1")
diff --git a/pactest/tests/upgrade055.py b/pactest/tests/upgrade055.py
index 7cdf6b5d..25083962 100644
--- a/pactest/tests/upgrade055.py
+++ b/pactest/tests/upgrade055.py
@@ -6,12 +6,10 @@ self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2")
lp2.provides = ["imaginary"]
-lp2.requiredby = [ "pkg1" ]
self.addpkg2db("local", lp2)
lp3 = pmpkg("pkg3")
lp3.provides = ["imaginary2"]
-lp3.requiredby = [ "pkg1" ]
self.addpkg2db("local", lp3)
p = pmpkg("pkg2", "1.0-2")
@@ -24,5 +22,4 @@ self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg1")
self.addrule("PKG_VERSION=pkg2|1.0-2")
self.addrule("PKG_EXIST=pkg3")
-self.addrule("PKG_REQUIREDBY=pkg2|pkg1")
self.addrule("PKG_DEPENDS=pkg1|imaginary")
diff --git a/pactest/tests/upgrade056.py b/pactest/tests/upgrade056.py
index b92c38ac..908fa30c 100644
--- a/pactest/tests/upgrade056.py
+++ b/pactest/tests/upgrade056.py
@@ -6,12 +6,10 @@ self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2")
lp2.provides = ["imaginary"]
-lp2.requiredby = [ "pkg1" ]
self.addpkg2db("local", lp2)
lp3 = pmpkg("pkg3")
lp3.provides = ["imaginary"]
-lp3.requiredby = [ "pkg1" ]
self.addpkg2db("local", lp3)
p = pmpkg("pkg2", "1.0-2")
@@ -23,5 +21,3 @@ self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg1")
self.addrule("PKG_VERSION=pkg2|1.0-2")
self.addrule("PKG_EXIST=pkg3")
-self.addrule("!PKG_REQUIREDBY=pkg2|pkg1")
-self.addrule("PKG_REQUIREDBY=pkg3|pkg1")
diff --git a/pactest/tests/upgrade057.py b/pactest/tests/upgrade057.py
index fd3e7138..b1eb5029 100644
--- a/pactest/tests/upgrade057.py
+++ b/pactest/tests/upgrade057.py
@@ -6,7 +6,6 @@ self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2")
lp2.provides = ["imag3"]
-lp2.requiredby = ["pkg1"]
self.addpkg2db("local", lp2)
p = pmpkg("pkg2", "1.0-2")
@@ -18,6 +17,5 @@ self.args = "-U %s" % p.filename()
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg1")
self.addrule("PKG_VERSION=pkg2|1.0-2")
-self.addrule("PKG_REQUIREDBY=pkg2|pkg1")
self.addrule("PKG_DEPENDS=pkg1|pkg2")
self.addrule("PKG_DEPENDS=pkg1|imag3")
diff --git a/pactest/tests/upgrade058.py b/pactest/tests/upgrade058.py
index 76416802..38576fff 100644
--- a/pactest/tests/upgrade058.py
+++ b/pactest/tests/upgrade058.py
@@ -5,7 +5,6 @@ lp1.depends = [ "pkg2=1.0" ]
self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2", "1.0-1")
-lp2.requiredby = [ "pkg1" ]
self.addpkg2db("local", lp2)
p = pmpkg("pkg2", "1.1-1")
@@ -14,4 +13,4 @@ self.addpkg(p)
self.args = "-U %s" % p.filename()
self.addrule("PACMAN_RETCODE=1")
-self.addrule("!PKG_VERSION=pkg2|1.1")
+self.addrule("!PKG_VERSION=pkg2|1.1-1")
diff --git a/pactest/tests/upgrade059.py b/pactest/tests/upgrade059.py
index 933e4e74..9cd9f1f0 100644
--- a/pactest/tests/upgrade059.py
+++ b/pactest/tests/upgrade059.py
@@ -6,12 +6,10 @@ self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2", "1.0-1")
lp2.provides = ["imaginary"]
-lp2.requiredby = [ "pkg1" ]
self.addpkg2db("local", lp2)
lp3 = pmpkg("pkg3", "1.0-1")
lp3.provides = ["imaginary"]
-lp3.requiredby = [ "pkg1" ]
self.addpkg2db("local", lp3)
p2 = pmpkg("pkg2", "1.0-2")
diff --git a/pactest/tests/upgrade060.py b/pactest/tests/upgrade060.py
index dd78bba3..7a28f3eb 100644
--- a/pactest/tests/upgrade060.py
+++ b/pactest/tests/upgrade060.py
@@ -5,7 +5,6 @@ lp1.depends = ["pkg2=1.0"]
self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2", "1.0-1")
-lp2.requiredby = [ "pkg1" ]
self.addpkg2db("local", lp2)
p1 = pmpkg("pkg1", "1.1-1")
diff --git a/pactest/tests/upgrade061.py b/pactest/tests/upgrade061.py
index 0b1ed4e5..310e5043 100644
--- a/pactest/tests/upgrade061.py
+++ b/pactest/tests/upgrade061.py
@@ -5,7 +5,6 @@ lp1.depends = ["imaginary"]
self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2", "1.0-1")
-lp2.requiredby = [ "pkg1" ]
lp2.provides = ["imaginary"]
self.addpkg2db("local", lp2)
diff --git a/pactest/tests/add060.py b/pactest/tests/upgrade070.py
index 4c5f17da..01f0ba48 100644
--- a/pactest/tests/add060.py
+++ b/pactest/tests/upgrade070.py
@@ -5,9 +5,9 @@ p.files = ["bin/dummy",
"usr/man/man1/dummy.1"]
self.addpkg(p)
-self.option["noextract"] = ["usr/man/man1/dummy.1"]
+self.option["NoExtract"] = ["usr/man/man1/dummy.1"]
-self.args = "-A %s" % p.filename()
+self.args = "-U %s" % p.filename()
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=dummy")
diff --git a/pactest/tests/add040.py b/pactest/tests/upgrade071.py
index 6d6da602..1f21c558 100644
--- a/pactest/tests/add040.py
+++ b/pactest/tests/upgrade071.py
@@ -6,7 +6,7 @@ p.files = ["bin/dummy",
p.depends = ["dep1"]
self.addpkg(p)
-self.args = "-A %s" % p.filename()
+self.args = "-U %s" % p.filename()
self.addrule("PACMAN_RETCODE=1")
self.addrule("!PKG_EXIST=dummy")
diff --git a/pactest/tests/add041.py b/pactest/tests/upgrade072.py
index af3ffe46..f88e150c 100644
--- a/pactest/tests/add041.py
+++ b/pactest/tests/upgrade072.py
@@ -6,7 +6,7 @@ p.files = ["bin/dummy",
p.depends = ["dep1"]
self.addpkg(p)
-self.args = "-Ad %s" % p.filename()
+self.args = "-Ud %s" % p.filename()
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=dummy")
diff --git a/pactest/tests/add042.py b/pactest/tests/upgrade073.py
index 48104b0c..752a2336 100644
--- a/pactest/tests/add042.py
+++ b/pactest/tests/upgrade073.py
@@ -15,14 +15,12 @@ p3.files = ["bin/dep2"]
for p in p1, p2, p3:
self.addpkg(p)
-self.args = "-A %s" % " ".join([p.filename() for p in p1, p2, p3])
+self.args = "-U %s" % " ".join([p.filename() for p in p1, p2, p3])
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_VERSION=dummy|1.0-2")
self.addrule("PKG_DEPENDS=dummy|dep1")
self.addrule("PKG_DEPENDS=dep1|dep2")
-self.addrule("PKG_REQUIREDBY=dep1|dummy")
-self.addrule("PKG_REQUIREDBY=dep2|dep1")
for p in p1, p2, p3:
self.addrule("PKG_EXIST=%s" % p.name)
for f in p.files:
diff --git a/pactest/tests/add046.py b/pactest/tests/upgrade074.py
index 5f967cbe..ca052855 100644
--- a/pactest/tests/add046.py
+++ b/pactest/tests/upgrade074.py
@@ -7,7 +7,7 @@ self.addpkg(p)
lp = pmpkg("pkg2", "1.9b-3")
self.addpkg2db("local", lp)
-self.args = "-A %s" % p.filename()
+self.args = "-U %s" % p.filename()
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg1")
diff --git a/pactest/tests/add047.py b/pactest/tests/upgrade075.py
index 153364a5..8d2f3fc4 100644
--- a/pactest/tests/add047.py
+++ b/pactest/tests/upgrade075.py
@@ -7,7 +7,7 @@ self.addpkg(p)
lp = pmpkg("pkg2", "2.0-3")
self.addpkg2db("local", lp)
-self.args = "-A %s" % p.filename()
+self.args = "-U %s" % p.filename()
self.addrule("PACMAN_RETCODE=1")
self.addrule("!PKG_EXIST=pkg1")
diff --git a/pactest/tests/requiredby001.py b/pactest/tests/upgrade076.py
index 0f05d82c..87ccbddf 100644
--- a/pactest/tests/requiredby001.py
+++ b/pactest/tests/upgrade076.py
@@ -1,11 +1,10 @@
-self.description = "A package is downgraded no longer satisfying a depend"
+self.description = "Package downgrade (failure)"
lp1 = pmpkg("pkg1")
lp1.depends = ["pkg2=1.1"]
self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2", "1.1-1")
-lp2.requiredby = ["pkg1"]
self.addpkg2db("local", lp2)
p = pmpkg("pkg2", "1.0-1")
@@ -15,6 +14,5 @@ self.args = "-U %s" % p.filename()
self.addrule("PACMAN_RETCODE=1")
self.addrule("PKG_EXIST=pkg1")
-self.addrule("PKG_VERSION=pkg2|1.1-1")
self.addrule("PKG_EXIST=pkg2")
-self.addrule("PKG_REQUIREDBY=pkg2|pkg1")
+self.addrule("PKG_VERSION=pkg2|1.1-1")
diff --git a/pactest/tests/xfercommand001.py b/pactest/tests/xfercommand001.py
index a9c41d8c..a645cf7f 100644
--- a/pactest/tests/xfercommand001.py
+++ b/pactest/tests/xfercommand001.py
@@ -3,7 +3,7 @@ self.description = "Quick check for using XferCommand"
# this setting forces us to download packages
self.cachepkgs = False
#wget doesn't support file:// urls. curl does
-self.option['xfercommand'] = ['/usr/bin/curl %u > %o']
+self.option['XferCommand'] = ['/usr/bin/curl %u > %o']
numpkgs = 10
pkgnames = []