From 3af0268fdbafbeb0a2e45d3555ef9d224d89c29d Mon Sep 17 00:00:00 2001 From: Andrew Gregory Date: Sat, 29 Nov 2014 18:02:56 -0500 Subject: remove.c: honor inverted patterns in noupgrade Signed-off-by: Andrew Gregory Signed-off-by: Allan McRae --- test/pacman/tests/TESTS | 1 + test/pacman/tests/noupgrade-inverted.py | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 test/pacman/tests/noupgrade-inverted.py (limited to 'test') diff --git a/test/pacman/tests/TESTS b/test/pacman/tests/TESTS index 052cf4b2..12adf6da 100644 --- a/test/pacman/tests/TESTS +++ b/test/pacman/tests/TESTS @@ -63,6 +63,7 @@ TESTS += test/pacman/tests/ldconfig003.py TESTS += test/pacman/tests/mode001.py TESTS += test/pacman/tests/mode002.py TESTS += test/pacman/tests/mode003.py +TESTS += test/pacman/tests/noupgrade-inverted.py TESTS += test/pacman/tests/pacman001.py TESTS += test/pacman/tests/pacman002.py TESTS += test/pacman/tests/pacman003.py diff --git a/test/pacman/tests/noupgrade-inverted.py b/test/pacman/tests/noupgrade-inverted.py new file mode 100644 index 00000000..8e7f1eaa --- /dev/null +++ b/test/pacman/tests/noupgrade-inverted.py @@ -0,0 +1,19 @@ +self.description = "Upgrade a package with files that match negated NoUpgrade patterns" + +lp = pmpkg("foobar") +lp.files = ["foo/bar", "foo/baz"] +self.addpkg2db("local", lp) + +p = pmpkg("foobar", "1.0-2") +p.files = ["foo/bar"] +self.addpkg(p) + +self.option["NoUpgrade"] = ["foo/*", "!foo/bar", "!foo/baz"] + +self.args = "-U %s" % p.filename() + +self.addrule("PKG_VERSION=foobar|1.0-2") +self.addrule("!FILE_EXIST=foo/baz") +self.addrule("FILE_MODIFIED=foo/bar") +self.addrule("!FILE_PACNEW=foo/bar") +self.addrule("!FILE_PACSAVE=foo/bar") -- cgit v1.2.3-24-g4f1b