1
0
Fork 0
apt/test/integration/test-bug-829651
Daniel Baumann 1af95933dd
Adding upstream version 3.0.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-30 17:53:03 +02:00

27 lines
704 B
Bash
Executable file

#!/bin/sh
set -e
TESTDIR="$(readlink -f "$(dirname "$0")")"
. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
if [ "$(id -u)" = '0' ]; then
msgskip 'Tests for unreadable files do not work as root'
exit 0
fi
insertinstalledpackage 'foo' 'amd64' '1'
insertpackage 'unstable' 'foo' 'amd64' '2'
setupaptarchive
testsuccess aptget indextargets
aptget clean
chmod -r rootdir/var/lib/dpkg/status
testfailureequal "E: Could not open file ${TMPWORKINGDIRECTORY}/rootdir/var/lib/dpkg/status - open (13: Permission denied)
E: Problem opening ${TMPWORKINGDIRECTORY}/rootdir/var/lib/dpkg/status
E: The package lists or status file could not be parsed or opened." aptget indextargets