From 266f06866bd56b86ca8525d2e07d48d08fedaa8f Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 8 Mar 2008 14:04:06 -0600 Subject: Move -A pactests that are relevant to -U, clean the rest out This is in anticipation of removing the -A/--add option from the pacman frontend. I've went through each of the pacman pactests that used the -A operation and decided whether they were worth keeping, whether there was already an upgrade test doing the same thing, or whether it should be moved over. The GIT rename log should make several of the moves obvious, but for those that were deleted: add001: handled by upgrade004 add002: worthless add004: worthless add010: handled by upgrade011 add050: handled by upgrade010 Signed-off-by: Dan McGee --- pactest/tests/add001.py | 13 ------------- pactest/tests/add002.py | 18 ------------------ pactest/tests/add003.py | 23 ----------------------- pactest/tests/add004.py | 18 ------------------ pactest/tests/add010.py | 15 --------------- pactest/tests/add011.py | 14 -------------- pactest/tests/add012.py | 20 -------------------- pactest/tests/add013.py | 23 ----------------------- pactest/tests/add020.py | 15 --------------- pactest/tests/add021.py | 16 ---------------- pactest/tests/add040.py | 14 -------------- pactest/tests/add041.py | 15 --------------- pactest/tests/add042.py | 29 ----------------------------- pactest/tests/add046.py | 14 -------------- pactest/tests/add047.py | 14 -------------- pactest/tests/add050.py | 17 ----------------- pactest/tests/add060.py | 15 --------------- pactest/tests/depconflict110.py | 2 +- pactest/tests/depconflict111.py | 2 +- pactest/tests/fileconflict001.py | 2 +- pactest/tests/fileconflict002.py | 2 +- pactest/tests/ldconfig001.py | 2 +- pactest/tests/smoke001.py | 2 +- pactest/tests/upgrade005.py | 23 +++++++++++++++++++++++ pactest/tests/upgrade012.py | 14 ++++++++++++++ pactest/tests/upgrade013.py | 20 ++++++++++++++++++++ pactest/tests/upgrade014.py | 23 +++++++++++++++++++++++ pactest/tests/upgrade015.py | 15 +++++++++++++++ pactest/tests/upgrade016.py | 16 ++++++++++++++++ pactest/tests/upgrade070.py | 15 +++++++++++++++ pactest/tests/upgrade071.py | 14 ++++++++++++++ pactest/tests/upgrade072.py | 15 +++++++++++++++ pactest/tests/upgrade073.py | 29 +++++++++++++++++++++++++++++ pactest/tests/upgrade074.py | 14 ++++++++++++++ pactest/tests/upgrade075.py | 14 ++++++++++++++ 35 files changed, 218 insertions(+), 299 deletions(-) delete mode 100644 pactest/tests/add001.py delete mode 100644 pactest/tests/add002.py delete mode 100644 pactest/tests/add003.py delete mode 100644 pactest/tests/add004.py delete mode 100644 pactest/tests/add010.py delete mode 100644 pactest/tests/add011.py delete mode 100644 pactest/tests/add012.py delete mode 100644 pactest/tests/add013.py delete mode 100644 pactest/tests/add020.py delete mode 100644 pactest/tests/add021.py delete mode 100644 pactest/tests/add040.py delete mode 100644 pactest/tests/add041.py delete mode 100644 pactest/tests/add042.py delete mode 100644 pactest/tests/add046.py delete mode 100644 pactest/tests/add047.py delete mode 100644 pactest/tests/add050.py delete mode 100644 pactest/tests/add060.py create mode 100644 pactest/tests/upgrade005.py create mode 100644 pactest/tests/upgrade012.py create mode 100644 pactest/tests/upgrade013.py create mode 100644 pactest/tests/upgrade014.py create mode 100644 pactest/tests/upgrade015.py create mode 100644 pactest/tests/upgrade016.py create mode 100644 pactest/tests/upgrade070.py create mode 100644 pactest/tests/upgrade071.py create mode 100644 pactest/tests/upgrade072.py create mode 100644 pactest/tests/upgrade073.py create mode 100644 pactest/tests/upgrade074.py create mode 100644 pactest/tests/upgrade075.py (limited to 'pactest/tests') 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/add003.py b/pactest/tests/add003.py deleted file mode 100644 index 4f8ae600..00000000 --- a/pactest/tests/add003.py +++ /dev/null @@ -1,23 +0,0 @@ -self.description = "Install a set of three packages" - -p1 = pmpkg("pkg1") -p1.files = ["bin/pkg1", - "usr/man/man1/pkg1.1"] - -p2 = pmpkg("pkg2", "2.0-1") -p2.files = ["bin/pkg2", - "usr/man/man1/pkg2.1"] - -p3 = pmpkg("pkg3", "3.0-1") -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.addrule("PACMAN_RETCODE=0") -for p in p1, p2, p3: - self.addrule("PKG_EXIST=%s" % p.name) - for f in p.files: - self.addrule("FILE_EXIST=%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/add011.py b/pactest/tests/add011.py deleted file mode 100644 index 5d2ae43f..00000000 --- a/pactest/tests/add011.py +++ /dev/null @@ -1,14 +0,0 @@ -self.description = "Install a package with a filesystem conflict (--force)" - -p = pmpkg("dummy") -p.files = ["bin/dummy", "usr/man/man1/dummy.1"] -self.addpkg(p) - -self.filesystem = ["bin/dummy"] - -self.args = "-Af %s" % p.filename() - -self.addrule("PACMAN_RETCODE=0") -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/add012.py b/pactest/tests/add012.py deleted file mode 100644 index 291d1fba..00000000 --- a/pactest/tests/add012.py +++ /dev/null @@ -1,20 +0,0 @@ -self.description = "Install two packages with a conflicting file" - -p1 = pmpkg("dummy") -p1.files = ["bin/dummy", - "usr/man/man1/dummy.1", - "usr/common"] - -p2 = pmpkg("foobar") -p2.files = ["bin/foobar", - "usr/man/man1/foobar.1", - "usr/common"] - -for p in p1, p2: - self.addpkg(p) - -self.args = "-A %s" % " ".join([p.filename() for p in p1, p2]) - -self.addrule("PACMAN_RETCODE=1") -self.addrule("!PKG_EXIST=dummy") -self.addrule("!PKG_EXIST=foobar") diff --git a/pactest/tests/add013.py b/pactest/tests/add013.py deleted file mode 100644 index 547ce001..00000000 --- a/pactest/tests/add013.py +++ /dev/null @@ -1,23 +0,0 @@ -self.description = "Install two packages with a conflicting file (--force)" - -p1 = pmpkg("dummy") -p1.files = ["bin/dummy", - "usr/man/man1/dummy.1", - "usr/common"] - -p2 = pmpkg("foobar") -p2.files = ["bin/foobar", - "usr/man/man1/foobar.1", - "usr/common"] - -for p in p1, p2: - self.addpkg(p) - -self.args = "-Af %s" % " ".join([p.filename() for p in p1, p2]) - -self.addrule("PACMAN_RETCODE=0") -for p in p1, p2: - self.addrule("PKG_EXIST=%s" % p.name) - self.addrule("PKG_FILES=%s|usr/common" % p.name) - for f in p.files: - self.addrule("FILE_EXIST=%s" % f) diff --git a/pactest/tests/add020.py b/pactest/tests/add020.py deleted file mode 100644 index 8a2f4a71..00000000 --- a/pactest/tests/add020.py +++ /dev/null @@ -1,15 +0,0 @@ -self.description = "Install a package with an existing file (--force)" - -p = pmpkg("dummy") -p.files = ["etc/dummy.conf"] -self.addpkg(p) - -self.filesystem = ["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") -self.addrule("!FILE_PACORIG=etc/dummy.conf") diff --git a/pactest/tests/add021.py b/pactest/tests/add021.py deleted file mode 100644 index a6dda963..00000000 --- a/pactest/tests/add021.py +++ /dev/null @@ -1,16 +0,0 @@ -self.description = "Install a package with an existing file (--force, new modified)" - -p = pmpkg("dummy") -p.files = ["etc/dummy.conf*"] -p.backup = ["etc/dummy.conf"] -self.addpkg(p) - -self.filesystem = ["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") -self.addrule("FILE_PACORIG=etc/dummy.conf") diff --git a/pactest/tests/add040.py b/pactest/tests/add040.py deleted file mode 100644 index 6d6da602..00000000 --- a/pactest/tests/add040.py +++ /dev/null @@ -1,14 +0,0 @@ -self.description = "Install a package with a missing dependency" - -p = pmpkg("dummy") -p.files = ["bin/dummy", - "usr/man/man1/dummy.1"] -p.depends = ["dep1"] -self.addpkg(p) - -self.args = "-A %s" % p.filename() - -self.addrule("PACMAN_RETCODE=1") -self.addrule("!PKG_EXIST=dummy") -for f in p.files: - self.addrule("!FILE_EXIST=%s" % f) diff --git a/pactest/tests/add041.py b/pactest/tests/add041.py deleted file mode 100644 index af3ffe46..00000000 --- a/pactest/tests/add041.py +++ /dev/null @@ -1,15 +0,0 @@ -self.description = "Install a package with a missing dependency (nodeps)" - -p = pmpkg("dummy") -p.files = ["bin/dummy", - "usr/man/man1/dummy.1"] -p.depends = ["dep1"] -self.addpkg(p) - -self.args = "-Ad %s" % p.filename() - -self.addrule("PACMAN_RETCODE=0") -self.addrule("PKG_EXIST=dummy") -self.addrule("PKG_DEPENDS=dummy|dep1") -for f in p.files: - self.addrule("FILE_EXIST=%s" % f) diff --git a/pactest/tests/add042.py b/pactest/tests/add042.py deleted file mode 100644 index 48104b0c..00000000 --- a/pactest/tests/add042.py +++ /dev/null @@ -1,29 +0,0 @@ -self.description = "Install a package with cascaded dependencies" - -p1 = pmpkg("dummy", "1.0-2") -p1.files = ["bin/dummy", - "usr/man/man1/dummy.1"] -p1.depends = ["dep1"] - -p2 = pmpkg("dep1") -p2.files = ["bin/dep1"] -p2.depends = ["dep2"] - -p3 = pmpkg("dep2") -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.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: - self.addrule("FILE_EXIST=%s" % f) diff --git a/pactest/tests/add046.py b/pactest/tests/add046.py deleted file mode 100644 index 5f967cbe..00000000 --- a/pactest/tests/add046.py +++ /dev/null @@ -1,14 +0,0 @@ -self.description = "pkg2<2.0 dependency (satisfy)" - -p = pmpkg("pkg1") -p.depends = ["pkg2<2.0"] -self.addpkg(p) - -lp = pmpkg("pkg2", "1.9b-3") -self.addpkg2db("local", lp) - -self.args = "-A %s" % p.filename() - -self.addrule("PACMAN_RETCODE=0") -self.addrule("PKG_EXIST=pkg1") -self.addrule("PKG_EXIST=pkg2") diff --git a/pactest/tests/add047.py b/pactest/tests/add047.py deleted file mode 100644 index 153364a5..00000000 --- a/pactest/tests/add047.py +++ /dev/null @@ -1,14 +0,0 @@ -self.description = "pkg2<2.0 dependency (not satisfy)" - -p = pmpkg("pkg1") -p.depends = ["pkg2<2.0"] -self.addpkg(p) - -lp = pmpkg("pkg2", "2.0-3") -self.addpkg2db("local", lp) - -self.args = "-A %s" % p.filename() - -self.addrule("PACMAN_RETCODE=1") -self.addrule("!PKG_EXIST=pkg1") -self.addrule("PKG_EXIST=pkg2") 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/add060.py b/pactest/tests/add060.py deleted file mode 100644 index 4c5f17da..00000000 --- a/pactest/tests/add060.py +++ /dev/null @@ -1,15 +0,0 @@ -self.description = "Install a package with a file in NoExtract" - -p = pmpkg("dummy") -p.files = ["bin/dummy", - "usr/man/man1/dummy.1"] -self.addpkg(p) - -self.option["noextract"] = ["usr/man/man1/dummy.1"] - -self.args = "-A %s" % p.filename() - -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/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/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/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/upgrade005.py b/pactest/tests/upgrade005.py new file mode 100644 index 00000000..0f8c13ef --- /dev/null +++ b/pactest/tests/upgrade005.py @@ -0,0 +1,23 @@ +self.description = "Install a set of three packages" + +p1 = pmpkg("pkg1") +p1.files = ["bin/pkg1", + "usr/man/man1/pkg1.1"] + +p2 = pmpkg("pkg2", "2.0-1") +p2.files = ["bin/pkg2", + "usr/man/man1/pkg2.1"] + +p3 = pmpkg("pkg3", "3.0-1") +p3.files = ["bin/pkg3", "usr/man/man1/pkg3.1"] + +for p in p1, p2, p3: + self.addpkg(p) + +self.args = "-U %s" % " ".join([p.filename() for p in p1, p2, p3]) + +self.addrule("PACMAN_RETCODE=0") +for p in p1, p2, p3: + self.addrule("PKG_EXIST=%s" % p.name) + for f in p.files: + self.addrule("FILE_EXIST=%s" % f) diff --git a/pactest/tests/upgrade012.py b/pactest/tests/upgrade012.py new file mode 100644 index 00000000..dba8dc18 --- /dev/null +++ b/pactest/tests/upgrade012.py @@ -0,0 +1,14 @@ +self.description = "Install a package with a filesystem conflict (--force)" + +p = pmpkg("dummy") +p.files = ["bin/dummy", "usr/man/man1/dummy.1"] +self.addpkg(p) + +self.filesystem = ["bin/dummy"] + +self.args = "-Uf %s" % p.filename() + +self.addrule("PACMAN_RETCODE=0") +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/upgrade013.py b/pactest/tests/upgrade013.py new file mode 100644 index 00000000..5a327599 --- /dev/null +++ b/pactest/tests/upgrade013.py @@ -0,0 +1,20 @@ +self.description = "Install two packages with a conflicting file" + +p1 = pmpkg("dummy") +p1.files = ["bin/dummy", + "usr/man/man1/dummy.1", + "usr/common"] + +p2 = pmpkg("foobar") +p2.files = ["bin/foobar", + "usr/man/man1/foobar.1", + "usr/common"] + +for p in p1, p2: + self.addpkg(p) + +self.args = "-U %s" % " ".join([p.filename() for p in p1, p2]) + +self.addrule("PACMAN_RETCODE=1") +self.addrule("!PKG_EXIST=dummy") +self.addrule("!PKG_EXIST=foobar") diff --git a/pactest/tests/upgrade014.py b/pactest/tests/upgrade014.py new file mode 100644 index 00000000..1632dd36 --- /dev/null +++ b/pactest/tests/upgrade014.py @@ -0,0 +1,23 @@ +self.description = "Install two packages with a conflicting file (--force)" + +p1 = pmpkg("dummy") +p1.files = ["bin/dummy", + "usr/man/man1/dummy.1", + "usr/common"] + +p2 = pmpkg("foobar") +p2.files = ["bin/foobar", + "usr/man/man1/foobar.1", + "usr/common"] + +for p in p1, p2: + self.addpkg(p) + +self.args = "-Uf %s" % " ".join([p.filename() for p in p1, p2]) + +self.addrule("PACMAN_RETCODE=0") +for p in p1, p2: + self.addrule("PKG_EXIST=%s" % p.name) + self.addrule("PKG_FILES=%s|usr/common" % p.name) + for f in p.files: + self.addrule("FILE_EXIST=%s" % f) diff --git a/pactest/tests/upgrade015.py b/pactest/tests/upgrade015.py new file mode 100644 index 00000000..22f7c36b --- /dev/null +++ b/pactest/tests/upgrade015.py @@ -0,0 +1,15 @@ +self.description = "Install a package with an existing file (--force)" + +p = pmpkg("dummy") +p.files = ["etc/dummy.conf"] +self.addpkg(p) + +self.filesystem = ["etc/dummy.conf"] + +self.args = "-Uf %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") +self.addrule("!FILE_PACORIG=etc/dummy.conf") diff --git a/pactest/tests/upgrade016.py b/pactest/tests/upgrade016.py new file mode 100644 index 00000000..dd31c9ab --- /dev/null +++ b/pactest/tests/upgrade016.py @@ -0,0 +1,16 @@ +self.description = "Install a package with an existing file (--force, new modified)" + +p = pmpkg("dummy") +p.files = ["etc/dummy.conf*"] +p.backup = ["etc/dummy.conf"] +self.addpkg(p) + +self.filesystem = ["etc/dummy.conf"] + +self.args = "-Uf %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") +self.addrule("FILE_PACORIG=etc/dummy.conf") diff --git a/pactest/tests/upgrade070.py b/pactest/tests/upgrade070.py new file mode 100644 index 00000000..018a6b10 --- /dev/null +++ b/pactest/tests/upgrade070.py @@ -0,0 +1,15 @@ +self.description = "Install a package with a file in NoExtract" + +p = pmpkg("dummy") +p.files = ["bin/dummy", + "usr/man/man1/dummy.1"] +self.addpkg(p) + +self.option["noextract"] = ["usr/man/man1/dummy.1"] + +self.args = "-U %s" % p.filename() + +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/upgrade071.py b/pactest/tests/upgrade071.py new file mode 100644 index 00000000..1f21c558 --- /dev/null +++ b/pactest/tests/upgrade071.py @@ -0,0 +1,14 @@ +self.description = "Install a package with a missing dependency" + +p = pmpkg("dummy") +p.files = ["bin/dummy", + "usr/man/man1/dummy.1"] +p.depends = ["dep1"] +self.addpkg(p) + +self.args = "-U %s" % p.filename() + +self.addrule("PACMAN_RETCODE=1") +self.addrule("!PKG_EXIST=dummy") +for f in p.files: + self.addrule("!FILE_EXIST=%s" % f) diff --git a/pactest/tests/upgrade072.py b/pactest/tests/upgrade072.py new file mode 100644 index 00000000..f88e150c --- /dev/null +++ b/pactest/tests/upgrade072.py @@ -0,0 +1,15 @@ +self.description = "Install a package with a missing dependency (nodeps)" + +p = pmpkg("dummy") +p.files = ["bin/dummy", + "usr/man/man1/dummy.1"] +p.depends = ["dep1"] +self.addpkg(p) + +self.args = "-Ud %s" % p.filename() + +self.addrule("PACMAN_RETCODE=0") +self.addrule("PKG_EXIST=dummy") +self.addrule("PKG_DEPENDS=dummy|dep1") +for f in p.files: + self.addrule("FILE_EXIST=%s" % f) diff --git a/pactest/tests/upgrade073.py b/pactest/tests/upgrade073.py new file mode 100644 index 00000000..3486c417 --- /dev/null +++ b/pactest/tests/upgrade073.py @@ -0,0 +1,29 @@ +self.description = "Install a package with cascaded dependencies" + +p1 = pmpkg("dummy", "1.0-2") +p1.files = ["bin/dummy", + "usr/man/man1/dummy.1"] +p1.depends = ["dep1"] + +p2 = pmpkg("dep1") +p2.files = ["bin/dep1"] +p2.depends = ["dep2"] + +p3 = pmpkg("dep2") +p3.files = ["bin/dep2"] + +for p in p1, p2, p3: + self.addpkg(p) + +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: + self.addrule("FILE_EXIST=%s" % f) diff --git a/pactest/tests/upgrade074.py b/pactest/tests/upgrade074.py new file mode 100644 index 00000000..ca052855 --- /dev/null +++ b/pactest/tests/upgrade074.py @@ -0,0 +1,14 @@ +self.description = "pkg2<2.0 dependency (satisfy)" + +p = pmpkg("pkg1") +p.depends = ["pkg2<2.0"] +self.addpkg(p) + +lp = pmpkg("pkg2", "1.9b-3") +self.addpkg2db("local", lp) + +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/upgrade075.py b/pactest/tests/upgrade075.py new file mode 100644 index 00000000..8d2f3fc4 --- /dev/null +++ b/pactest/tests/upgrade075.py @@ -0,0 +1,14 @@ +self.description = "pkg2<2.0 dependency (not satisfy)" + +p = pmpkg("pkg1") +p.depends = ["pkg2<2.0"] +self.addpkg(p) + +lp = pmpkg("pkg2", "2.0-3") +self.addpkg2db("local", lp) + +self.args = "-U %s" % p.filename() + +self.addrule("PACMAN_RETCODE=1") +self.addrule("!PKG_EXIST=pkg1") +self.addrule("PKG_EXIST=pkg2") -- cgit v1.2.3-70-g09d2