]>
git.saurik.com Git - apt.git/blob - test/integration/test-apt-never-markauto-sections
4 TESTDIR
="$(readlink -f "$(dirname "$0")")"
7 configarchitecture 'amd64' 'i386'
9 aptconfig dump --no-empty --format '%v%n' APT::Never-MarkAuto-Sections > nevermarkauto.sections
10 testsuccess grep '^metapackages$' nevermarkauto.sections
12 buildsimplenativepackage 'mydesktop' 'all' '1' 'unstable' 'Depends: mydesktop-core, foreignpkg
13 Recommends: notavailable' '' 'metapackages'
14 buildsimplenativepackage 'mydesktop-core' 'amd64' '1' 'unstable' 'Depends: bad-texteditor | texteditor, browser (>= 42), nosection, foreignpkg
15 Recommends: notavailable
16 Multi-Arch: foreign' '' 'metapackages'
17 buildsimplenativepackage 'browser' 'amd64' '41' 'stable'
18 buildsimplenativepackage 'browser' 'amd64' '42' 'unstable'
19 buildsimplenativepackage 'texteditor' 'amd64' '1' 'stable'
20 buildsimplenativepackage 'bad-texteditor' 'amd64' '1' 'stable' 'Depends: texteditor
21 Conflicts: mydesktop-core'
22 buildsimplenativepackage 'nosection' 'amd64' '1' 'stable' '' '' '<none>'
23 buildsimplenativepackage 'foreignpkg' 'i386' '1' 'stable' 'Multi-Arch: foreign'
26 testsuccess aptcache show nosection
27 testfailure grep 'Section' rootdir/tmp/testsuccess.output
28 testequal 'dpkg' aptmark showmanual
30 testsuccess aptget install mydesktop -y -o Debug::pkgProblemResolver=1 -o Debug::pkgDepCache::Marker=1
32 testmarkedmanual 'dpkg' 'mydesktop'
33 testmarkedauto 'mydesktop-core' 'foreignpkg:i386' 'texteditor' 'browser' 'nosection'
35 # if the remove is from a user, don't do manual-bit passing
36 testequal 'Reading package lists...
37 Building dependency tree...
38 Reading state information...
39 The following packages will be REMOVED:
40 browser foreignpkg:i386 mydesktop mydesktop-core nosection texteditor
41 0 upgraded, 0 newly installed, 6 to remove and 0 not upgraded.
43 Remv mydesktop-core [1]
45 Remv foreignpkg:i386 [1]
47 Remv texteditor [1]' aptget autoremove mydesktop -s
49 testequal 'Reading package lists...
50 Building dependency tree...
51 Reading state information...
52 The following packages will be REMOVED:
53 mydesktop mydesktop-core texteditor
54 0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
56 Remv mydesktop-core [1]
57 Remv texteditor [1]' aptget autoremove texteditor -s #-o Debug::pkgDepCache::AutoInstall=1 -o Debug::pkgProblemResolver=1 -o Debug::pkgDepCache::Marker=1
58 testsuccess aptget autoremove texteditor -y
60 testdpkgnotinstalled mydesktop mydesktop-core texteditor
61 testdpkginstalled browser
63 testmarkedmanual 'browser' 'dpkg' 'foreignpkg:i386' 'nosection'
66 # test that installed/upgraded auto-pkgs are not set to manual
68 testsuccess aptget install browser=41 -y --allow-downgrades
70 testmarkedmanual 'browser' 'dpkg' 'foreignpkg:i386' 'nosection'
72 testsuccess aptmark auto browser
73 testmarkedauto 'browser'
74 testsuccess aptmark auto nosection
75 testmarkedauto 'browser' 'nosection'
76 testmarkedmanual 'dpkg' 'foreignpkg:i386'
78 # nosection should be auto, not manual, but is marked as such by the resolver
79 # removing mydesktop-core temporally… the resolver should be figuring out here
80 # that there is no point of removing mydesktop-core as its an unavoidable
81 # dependency of the user-requested mydesktop
83 testsuccess aptget install mydesktop -y -o Debug::pkgProblemResolver=1 -o Debug::pkgDepCache::Marker=1 -o Debug::pkgDepCache::AutoInstall=1
85 testmarkedmanual 'dpkg' 'foreignpkg:i386' 'mydesktop' 'nosection'
86 testmarkedauto 'browser' 'mydesktop-core' 'texteditor'