[pacman-dev] [PATCH 1/2] Add test to check for indirect optdepend removal

Chirantan Ekbote chirantan.ekbote at gmail.com
Fri Dec 20 14:10:19 EST 2013


If package brown-sugar provides package sugar and package coffee
optionally depends on sugar, pacman should print a warning when
brown-sugar is removed.

Signed-off-by: Chirantan Ekbote <chirantan.ekbote at gmail.com>
---
 test/pacman/tests/TESTS        |  1 +
 test/pacman/tests/remove072.py | 14 ++++++++++++++
 2 files changed, 15 insertions(+)
 create mode 100644 test/pacman/tests/remove072.py

diff --git a/test/pacman/tests/TESTS b/test/pacman/tests/TESTS
index fc6a7e8..6c56268 100644
--- a/test/pacman/tests/TESTS
+++ b/test/pacman/tests/TESTS
@@ -112,6 +112,7 @@ TESTS += test/pacman/tests/remove052.py
 TESTS += test/pacman/tests/remove060.py
 TESTS += test/pacman/tests/remove070.py
 TESTS += test/pacman/tests/remove071.py
+TESTS += test/pacman/tests/remove072.py
 TESTS += test/pacman/tests/replace100.py
 TESTS += test/pacman/tests/replace101.py
 TESTS += test/pacman/tests/replace102.py
diff --git a/test/pacman/tests/remove072.py b/test/pacman/tests/remove072.py
new file mode 100644
index 0000000..0a29b39
--- /dev/null
+++ b/test/pacman/tests/remove072.py
@@ -0,0 +1,14 @@
+self.description = "Remove a package that provides an optdepend"
+
+p1 = pmpkg("brown-sugar")
+p1.provides = ["sugar"]
+self.addpkg2db("local", p1)
+
+p2 = pmpkg("coffee")
+p2.optdepends = ["sugar"]
+self.addpkg2db("local", p2)
+
+self.args = "-R %s" % p1.name
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("PACMAN_OUTPUT=coffee optionally requires sugar")
-- 
1.8.5.1



More information about the pacman-dev mailing list