[pacman-dev] [PATCH] Pactest for removing multiple items in a dependency chain
Allan McRae
mcrae_allan at hotmail.com
Thu Apr 3 02:43:04 EDT 2008
From 6981d942fdd38710895df8741f490201712b79eb Mon Sep 17 00:00:00 2001
From: Allan McRae <mcrae_allan at hotmail.com>
Date: Thu, 3 Apr 2008 16:35:14 +1000
Subject: [PATCH] Pactest for removing multiple items in a dependency chain
This adds a test for when removing multilpe packages recursively from a
chain
of dependent packages. This situation can occur when removing installed
dependencies with makepkg if a "makedepend" recursively depends on a
"depend"
or if redundant dependancies are included.
Signed-off-by: Allan McRae <mcrae_allan at hotmail.com>
---
pactest/tests/remove052.py | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
create mode 100644 pactest/tests/remove052.py
diff --git a/pactest/tests/remove052.py b/pactest/tests/remove052.py
new file mode 100644
index 0000000..53f516e
--- /dev/null
+++ b/pactest/tests/remove052.py
@@ -0,0 +1,22 @@
+self.description = "-Rs test (dependency chain)"
+
+lp1 = pmpkg("pkg1")
+lp1.reason = 1
+self.addpkg2db("local", lp1)
+
+lp2 = pmpkg("pkg2")
+lp2.depends = ["pkg1"]
+lp2.reason = 1
+self.addpkg2db("local", lp2)
+
+lp3 = pmpkg("pkg3")
+lp3.depends = ["pkg2"]
+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")
--
1.5.4.5
More information about the pacman-dev
mailing list