[pacman-dev] CVS update of pacman-lib (2 files)
Aaron Griffin
aaron at archlinux.org
Wed Apr 4 00:43:24 EDT 2007
Date: Wednesday, April 4, 2007 @ 00:43:24
Author: aaron
Path: /home/cvs-pacman/pacman-lib
Added: pactest/tests/remove001.py (1.1)
Modified: lib/libalpm/trans.c (1.45 -> 1.46)
* Fix FS#6798 - there is no reason to fail on a duplicate removal target
Added a pactest case for this ("-R foo foo foo foo foo" should do what is
expected)
----------------------------+
lib/libalpm/trans.c | 3 ++-
pactest/tests/remove001.py | 10 ++++++++++
2 files changed, 12 insertions(+), 1 deletion(-)
Index: pacman-lib/lib/libalpm/trans.c
diff -u pacman-lib/lib/libalpm/trans.c:1.45 pacman-lib/lib/libalpm/trans.c:1.46
--- pacman-lib/lib/libalpm/trans.c:1.45 Mon Mar 12 00:47:58 2007
+++ pacman-lib/lib/libalpm/trans.c Wed Apr 4 00:43:24 2007
@@ -135,7 +135,8 @@
ASSERT(target != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1));
if(alpm_list_find_str(trans->targets, target)) {
- RET_ERR(PM_ERR_TRANS_DUP_TARGET, -1);
+ return(0);
+ //RET_ERR(PM_ERR_TRANS_DUP_TARGET, -1);
}
switch(trans->type) {
Index: pacman-lib/pactest/tests/remove001.py
diff -u /dev/null pacman-lib/pactest/tests/remove001.py:1.1
--- /dev/null Wed Apr 4 00:43:24 2007
+++ pacman-lib/pactest/tests/remove001.py Wed Apr 4 00:43:24 2007
@@ -0,0 +1,10 @@
+# If someone else can come up with a better name, please do so
+self.description = "Remove a package listed 5 times"
+
+p = pmpkg("foo")
+self.addpkg2db("local", p)
+
+self.args = "-R " + "foo "*5
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("!PKG_EXISTS=foo")
More information about the pacman-dev
mailing list