diff options
author | Dan McGee <dan@archlinux.org> | 2011-02-25 14:57:41 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-02-25 14:57:41 +0100 |
commit | ab49bf6fa9df6daf7210c28ddfcf013ee9fe4386 (patch) | |
tree | e5c868f57f26375ed5929a8df038282d5f028f3f | |
parent | 2f96764058b89ff32c928a736308c5095f1ff764 (diff) | |
download | pacman-ab49bf6fa9df6daf7210c28ddfcf013ee9fe4386.tar.gz pacman-ab49bf6fa9df6daf7210c28ddfcf013ee9fe4386.tar.xz |
Add test case for util-linux/util-linux-ng name switch and deps
This case currently fails, but highlights a failure in our install
process I experienced the other day. Because we don't do replacement
uninstalls inline with the rest of the upgrade uninstalls, we can have a
time on our system where a critical package is not installed.
I hope no one ever renames glibc.
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r-- | test/pacman/tests/replace100.py | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/test/pacman/tests/replace100.py b/test/pacman/tests/replace100.py new file mode 100644 index 00000000..f94ca0f7 --- /dev/null +++ b/test/pacman/tests/replace100.py @@ -0,0 +1,45 @@ +self.description = "Sysupgrade with a replace and dependency chain" + +sp1 = pmpkg("util-linux", "2.19-1") +sp1.replaces = ["util-linux-ng"] +sp1.conflicts = ["util-linux-ng"] +sp1.provides = ["util-linux-ng=2.19"] +sp1.files = ["sbin/blkid"] +self.addpkg2db("sync", sp1) + +sp2 = pmpkg("mkinitcpio", "0.6.8-1") +sp2.depends = ["util-linux-ng>=2.17"] +self.addpkg2db("sync", sp2) + +sp3 = pmpkg("kernel26", "2.6.37.1-1") +sp3.depends = ["mkinitcpio>=0.6.8"] +# /sbin/blkid is in both util-linux and util-linux-ng; however, if we cannot +# find it, that means we ended up in limbo between removing the old named +# package and installing the new named package. +sp3.install['post_upgrade'] = "if [ -f sbin/blkid ]; then echo '' > foundit; fi" +self.addpkg2db("sync", sp3) + + +lp1 = pmpkg("util-linux-ng", "2.18-1") +lp1.files = ["sbin/blkid"] +self.addpkg2db("local", lp1) + +lp2 = pmpkg("mkinitcpio", "0.6.8-1") +lp2.depends = ["util-linux-ng>=2.17"] +self.addpkg2db("local", lp2) + +lp3 = pmpkg("kernel26", "2.6.37-1") +lp3.depends = ["mkinitcpio>=0.6.8"] +self.addpkg2db("local", lp3) + + +self.args = "-Su" + +self.addrule("PACMAN_RETCODE=0") +self.addrule("!PKG_EXIST=util-linux-ng") +self.addrule("PKG_VERSION=util-linux|2.19-1") +self.addrule("PKG_VERSION=kernel26|2.6.37.1-1") +self.addrule("FILE_EXIST=sbin/blkid") +self.addrule("FILE_EXIST=foundit") + +self.expectfailure = True |