From da0dcc29cf038de7dee9b16987b508e45d56ae91 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Wed, 20 Jun 2012 16:18:42 -0400 Subject: query: avoid false ownership matches for files in root Check for an exact match when querying ownership of files in the root. Previously, our test was too simple and would match the the basename of package files against the query parameter, e.g. $ pacman -Qo config /config is owned by cower-git 20120614-1 Adds a new test to verify this behavior, query007.py. Fixes FS#30388. Signed-off-by: Dave Reisner Signed-off-by: Dan McGee --- test/pacman/tests/query007.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/pacman/tests/query007.py (limited to 'test') diff --git a/test/pacman/tests/query007.py b/test/pacman/tests/query007.py new file mode 100644 index 00000000..35bb0ca6 --- /dev/null +++ b/test/pacman/tests/query007.py @@ -0,0 +1,11 @@ +self.description = "Query ownership of file in root" + +sp = pmpkg("dummy") +sp.files = ["etc/config"] +self.addpkg2db("local", sp) + +self.filesystem = ["config"] + +self.args = "-Qo /config" + +self.addrule("PACMAN_RETCODE=1") -- cgit v1.2.3-24-g4f1b