Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2014-11-29 18:02:57 -0500
committerAllan McRae <allan@archlinux.org>2015-03-03 16:54:17 +1000
commit156d41a18628d6e63cc49cfcb27e9c96826f9e74 (patch)
tree924f97e1d46da407b950de2794d6ddf947ab1a5c /test
parentba532bda6b558e5bbf429bfa8f806ac8122c8d56 (diff)
remove: use strcmp for files in skip_remove
Paths from noupgrade, the transaction skip_remove, and package backup lists were combined into a single list matched using fnmatch causing paths with glob characters to match unrelated files. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'test')
-rw-r--r--test/pacman/tests/TESTS1
-rw-r--r--test/pacman/tests/skip-remove-with-glob-chars.py19
2 files changed, 20 insertions, 0 deletions
diff --git a/test/pacman/tests/TESTS b/test/pacman/tests/TESTS
index 12adf6da..3ff0b0c2 100644
--- a/test/pacman/tests/TESTS
+++ b/test/pacman/tests/TESTS
@@ -127,6 +127,7 @@ TESTS += test/pacman/tests/scriptlet001.py
TESTS += test/pacman/tests/scriptlet002.py
TESTS += test/pacman/tests/sign001.py
TESTS += test/pacman/tests/sign002.py
+TESTS += test/pacman/tests/skip-remove-with-glob-chars.py
TESTS += test/pacman/tests/smoke001.py
TESTS += test/pacman/tests/smoke002.py
TESTS += test/pacman/tests/smoke003.py
diff --git a/test/pacman/tests/skip-remove-with-glob-chars.py b/test/pacman/tests/skip-remove-with-glob-chars.py
new file mode 100644
index 00000000..039e1504
--- /dev/null
+++ b/test/pacman/tests/skip-remove-with-glob-chars.py
@@ -0,0 +1,19 @@
+self.description = "transferred file with glob characters that match a removed file"
+
+lp = pmpkg("foo")
+lp.files = ["foo/b*r", "foo/bar"]
+self.addpkg2db("local", lp)
+
+sp1 = pmpkg("foo", "1.0-2")
+self.addpkg(sp1)
+
+sp2 = pmpkg("bar", "1.0-2")
+sp2.files = ["foo/b*r"]
+self.addpkg(sp2)
+
+self.args = "-U %s %s" % (sp1.filename(), sp2.filename())
+
+self.addrule("PKG_VERSION=foo|1.0-2")
+self.addrule("PKG_VERSION=bar|1.0-2")
+self.addrule("FILE_EXIST=foo/b*r")
+self.addrule("!FILE_EXIST=foo/bar")