aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2020-01-03 13:43:49 +0100
committerFabian Groffen <grobian@gentoo.org>2020-01-03 13:43:49 +0100
commit4d6b231cf0973e1d3b869d98a0e263155f04b20c (patch)
treea8d52930d51ee0835764dcc6c5c2c74fd2e35ead /tests
parenttests/qmerge: add 2-level negation INSTALL_MASK test (diff)
downloadportage-utils-4d6b231cf0973e1d3b869d98a0e263155f04b20c.tar.gz
portage-utils-4d6b231cf0973e1d3b869d98a0e263155f04b20c.tar.bz2
portage-utils-4d6b231cf0973e1d3b869d98a0e263155f04b20c.zip
tests/qmerge: test masking an intermediate level in INSTALL_MASK
this tests the case from the archives: /usr/foo -/usr/foo/bar /usr/foo/bar/baz Bug: https://bugs.gentoo.org/699376 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/qmerge/dotest12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/qmerge/dotest b/tests/qmerge/dotest
index 1bbf5f7e..208bc3bb 100755
--- a/tests/qmerge/dotest
+++ b/tests/qmerge/dotest
@@ -118,6 +118,18 @@ tend $? "qmerge-test: [M] uninstall" || die "${out}"
[[ ! -e ${ROOT}/usr/bin/dummy ]]
tend $? "qmerge-test: [M] /usr/bin/dummy removed" || die "$(treedir "${ROOT}")"
+export INSTALL_MASK="/usr -/usr/bin /usr/bin/dummy"
+out=$(yes | qmerge -F qmerge-test)
+tend $? "qmerge-test: [M] install except /usr/bin/dummy" || die "${out}"
+[[ ! -e ${ROOT}/usr/bin/dummy ]]
+tend $? "qmerge-test: [M] found no /usr/bin/dummy" || die "$(treedir "${ROOT}")"
+[[ -e ${ROOT}/usr/bin/qmerge-test ]]
+tend $? "qmerge-test: [M] found /usr/bin/qmerge-test" || die "$(treedir "${ROOT}")"
+
+out=$(yes | qmerge -FU qmerge-test)
+tend $? "qmerge-test: [M] uninstall" || die "${out}"
+[[ ! -e ${ROOT}/usr/bin/qmerge-test ]]
+tend $? "qmerge-test: [M] /usr/bin/qmerge-test removed" || die "$(treedir "${ROOT}")"
set -e
cleantmpdir