1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

add test for file type check with -Qk

If a directory has been replaced by a symlink, -Qk currently stats the
symlink target rather than the symlink itself and doesn't check that the
actual file type matches the package file list.  This will make it
difficult to discover errors once 4.2 is released and replacing
directories with symlinks is no longer supported.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
This commit is contained in:
Andrew Gregory 2014-06-26 12:33:33 -04:00 committed by Allan McRae
parent 79548e0d78
commit 0e2db97a42
2 changed files with 15 additions and 0 deletions

View File

@ -90,6 +90,7 @@ TESTS += test/pacman/tests/query011.py
TESTS += test/pacman/tests/query012.py
TESTS += test/pacman/tests/querycheck001.py
TESTS += test/pacman/tests/querycheck002.py
TESTS += test/pacman/tests/querycheck_fast_file_type.py
TESTS += test/pacman/tests/reason001.py
TESTS += test/pacman/tests/remove001.py
TESTS += test/pacman/tests/remove002.py

View File

@ -0,0 +1,14 @@
self.description = "check file type without mtree"
self.filesystem = [ "bar/", "foo -> bar/" ]
pkg = pmpkg("dummy")
pkg.files = [ "foo/" ]
self.addpkg2db("local",pkg)
self.args = "-Qk"
self.addrule("PACMAN_RETCODE=1")
self.addrule("PACMAN_OUTPUT=warning.*(File type mismatch)")
self.expectfailure = True