summaryrefslogtreecommitdiffstats
path: root/test/pacman/tests/overwrite-files-match-negated.py
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2017-04-10 02:42:01 +0200
committerAllan McRae <allan@archlinux.org>2017-04-12 03:47:33 +0200
commit04d211effa8d65020887112ee30c7b3b0fc28ad3 (patch)
tree9939b65851a6fc5bb6a0863d286b8da0d4876e74 /test/pacman/tests/overwrite-files-match-negated.py
parent86f5c74694cb0403eaf11fa4734f307a0df345cb (diff)
downloadpacman-04d211effa8d65020887112ee30c7b3b0fc28ad3.tar.gz
pacman-04d211effa8d65020887112ee30c7b3b0fc28ad3.tar.xz
add --overwrite option to ignore file conflicts
Allows for safer, more fine-grained control for overwriting files than --force's all-or-nothing approach. Implements FS#31549. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'test/pacman/tests/overwrite-files-match-negated.py')
-rw-r--r--test/pacman/tests/overwrite-files-match-negated.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/pacman/tests/overwrite-files-match-negated.py b/test/pacman/tests/overwrite-files-match-negated.py
new file mode 100644
index 00000000..42b1be2d
--- /dev/null
+++ b/test/pacman/tests/overwrite-files-match-negated.py
@@ -0,0 +1,13 @@
+self.description = "Install a package with an existing file matching a negated --overwrite pattern"
+
+p = pmpkg("dummy")
+p.files = ["foobar"]
+self.addpkg(p)
+
+self.filesystem = ["foobar*"]
+
+self.args = "-U --overwrite=foobar --overwrite=!foo* %s" % p.filename()
+
+self.addrule("!PACMAN_RETCODE=0")
+self.addrule("!PKG_EXIST=dummy")
+self.addrule("!FILE_MODIFIED=foobar")