]>
git.saurik.com Git - apt.git/blob - test/integration/test-kernel-helper-autoremove
6 TESTDIR
=$(readlink -f $(dirname $0))
11 addtrap
"cd /; rm -rf $TMPDIR"
13 # create mock environment
15 cat > aptconfig.conf
<<EOF
16 Dir::Etc::parts "$TMPDIR/apt.conf.d";
17 Dir::bin::dpkg "$TMPDIR/fake-dpkg";
19 APT_CONFIG
=aptconfig.conf
22 # install fake-dpkg into it
23 install -m755 $TESTDIR/test-kernel-helper-autoremove.fake
-dpkg $TMPDIR/fake
-dpkg
26 sh
${TESTDIR}/..
/..
/debian
/apt.auto
-removal.sh
28 # and ensure its there, valid and version 10.0.0-1 is there too
29 test -e $TMPDIR/apt.conf.d
/01autoremove
-kernels
30 apt
-config -c ${APT_CONFIG} dump
|grep -q "APT::NeverAutoRemove::.*\^linux-image-10.0.0-1-generic\.\*"
31 # ... and also that the running kernel is excluded
32 apt
-config -c ${APT_CONFIG} dump
|grep -q "APT::NeverAutoRemove::.*\^linux-image-$(uname -r)\.\*"