]>
git.saurik.com Git - apt.git/blob - test/integration/test-autoremove
7127b3d82af83e400898f34ad12be2b5a086ca1a
4 local TESTDIR
=$(readlink -f $(dirname $0))
7 configarchitecture
'i386'
9 buildsimplenativepackage
'unrelated' 'all' '1' 'unstable'
10 buildsimplenativepackage
'po-debconf' 'all' '1.0.16' 'unstable'
11 buildsimplenativepackage
'debhelper' 'all' '8.0.0' 'unstable' 'Depends: po-debconf'
14 aptget
install unrelated debhelper
-qq 2>&1 > /dev
/null
15 testdpkginstalled
'unrelated' 'debhelper' 'po-debconf'
17 testfileequal
'rootdir/var/lib/apt/extended_states' 'Package: po-debconf
21 aptget remove debhelper
-y -qq 2>&1 > /dev
/null
22 testdpkgnoninstalled
'debhelper'
23 testdpkginstalled
'po-debconf unrelated'
25 echo 'APT::NeverAutoRemove { "^debc.*nf$"; };' > rootdir
/etc
/apt
/apt.conf.d
/00autoremove
26 testequal
'Reading package lists...
27 Building dependency tree...
28 Reading state information...
29 The following packages will be REMOVED:
31 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
32 Remv po-debconf [1.0.16]' aptget autoremove
-s
33 testdpkginstalled
'po-debconf'
35 echo 'APT::NeverAutoRemove { "^po-debconf$"; };' > rootdir
/etc
/apt
/apt.conf.d
/00autoremove
36 aptget autoremove
-y -qq 2>&1 > /dev
/null
37 testdpkginstalled
'po-debconf'
39 echo 'APT::NeverAutoRemove { "^po-.*$"; };' > rootdir
/etc
/apt
/apt.conf.d
/00autoremove
40 aptget autoremove
-y -qq 2>&1 > /dev
/null
41 testdpkginstalled
"po-debconf"
43 rm rootdir
/etc
/apt
/apt.conf.d
/00autoremove
44 aptget autoremove
-y -qq 2>&1 > /dev
/null
45 testdpkgnoninstalled
'po-debconf'
47 testfileequal
'rootdir/var/lib/apt/extended_states' ''
49 sed -i rootdir
/var
/log
/apt
/history.log
-e '/^Commandline: / d' -e '/^Start-Date: / d' -e '/^End-Date: / d'
50 testfileequal
'rootdir/var/log/apt/history.log' '
51 Install: unrelated:i386 (1), debhelper:i386 (8.0.0), po-debconf:i386 (1.0.16, automatic)
53 Remove: debhelper:i386 (8.0.0)
55 Remove: po-debconf:i386 (1.0.16)'