From ddd8fc3d28cd8e668868158049ced7fa3c8c71b8 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 29 Jun 2020 17:31:06 +0200 Subject: Add basic support for the Protected field This will be mapped to Important for the time being. --- test/integration/test-dpkg-protected | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 test/integration/test-dpkg-protected (limited to 'test') diff --git a/test/integration/test-dpkg-protected b/test/integration/test-dpkg-protected new file mode 100755 index 000000000..3d0994d89 --- /dev/null +++ b/test/integration/test-dpkg-protected @@ -0,0 +1,20 @@ +#!/bin/sh +set -e + +TESTDIR="$(readlink -f "$(dirname "$0")")" +. "$TESTDIR/framework" +setupenvironment +configarchitecture 'amd64' + +insertinstalledpackage 'protected-package' 'native' '1' 'Protected: yes' + +setupaptarchive + + +if dpkg --assert-protected-field 2>/dev/null; then + testsuccess aptget remove protected-package "$@" -o Debug::pkgDpkgPm=1 -y --allow-remove-essential + cp rootdir/tmp/testsuccess.output rootdir/tmp/output + testsuccess grep -- '--force-remove-protected' rootdir/tmp/output +else + msgskip "dpkg does not support protected field" +fi -- cgit v1.2.3