diff options
| author | David Kalnischkies <david@kalnischkies.de> | 2023-01-29 16:54:39 +0100 |
|---|---|---|
| committer | David Kalnischkies <david@kalnischkies.de> | 2023-01-30 00:55:05 +0100 |
| commit | 8aeb07448c09375c730c76a6baf31303b129bb96 (patch) | |
| tree | 45e6007657f9a1ba3b0d80c7e9c4a74da2f31aa4 /test | |
| parent | 0dd4e0b4caeeb3e943a993db79c416d491c469cd (diff) | |
Have values in Section config trees refer to them in all components
Hard coding each and every component is not only boring but given that
everyone is free to add or use more we end up in situations in which apt
behaves differently for the same binary package just because metadata
said it is in different components (e.g. non-free vs. non-free-firmware).
It is also probably not what the casual user would expect.
So we instead treat a value without a component as if it applies for all
of them. The previous behaviour can be restored by prefixing the value
with "<undefined>/" as in the component is not defined.
In an ideal world we would probably use "*/foo" for the new default
instead of changing the behaviour for "foo", but it seems rather
unlikely that the old behaviour is actually desired. All existing values
were duplicated for all (previously) known components in Debian and
Ubuntu.
Diffstat (limited to 'test')
| -rwxr-xr-x | test/integration/test-apt-move-and-forget-manual-sections | 45 | ||||
| -rwxr-xr-x | test/integration/test-apt-never-markauto-sections | 3 |
2 files changed, 46 insertions, 2 deletions
diff --git a/test/integration/test-apt-move-and-forget-manual-sections b/test/integration/test-apt-move-and-forget-manual-sections index 4617abab3..ab90be0c0 100755 --- a/test/integration/test-apt-move-and-forget-manual-sections +++ b/test/integration/test-apt-move-and-forget-manual-sections @@ -11,15 +11,18 @@ testsuccess grep '^oldlibs$' move-autobit.sections buildsimplenativepackage 'libabc' 'native' '1' 'stable' '' '' 'libs' buildsimplenativepackage 'libabc' 'native' '2' 'unstable' 'Depends: libdef' '' 'oldlibs' +buildsimplenativepackage 'libzoo' 'native' '1' 'stable' '' '' 'libs' +buildsimplenativepackage 'libzoo' 'native' '2' 'unstable' 'Depends: libdef' '' 'non-free/oldlibs' buildsimplenativepackage 'libdef' 'native' '1' 'unstable' '' '' 'libs' setupaptarchive testmarkedauto testmarkedmanual +msgmsg 'Move bit on install of replacement' testsuccess aptget install libabc/stable -y testdpkginstalled 'libabc' -testdpkgnotinstalled 'libdef' +testdpkgnotinstalled 'libdef' 'libzoo' testmarkedmanual 'libabc' testmarkedauto @@ -29,3 +32,43 @@ testdpkginstalled 'libabc' 'libdef' testmarkedauto 'libabc' testmarkedmanual 'libdef' + +testsuccess apt autopurge -y +testdpkgnotinstalled 'libabc' 'libzoo' + +msgmsg 'Do not move bit if replacement is already installed' +testsuccess aptget install libzoo/stable -y +testdpkginstalled 'libzoo' + +testmarkedmanual 'libzoo' 'libdef' +testmarkedauto + +testsuccess aptmark auto libdef +testmarkedauto 'libdef' + +testsuccess aptget dist-upgrade -y +testdpkginstalled 'libzoo' 'libdef' + +testmarkedmanual 'libzoo' +testmarkedauto 'libdef' + +testsuccess apt autopurge -y libzoo- +testdpkgnotinstalled 'libabc' 'libzoo' 'libdef' + +msgmsg 'Move bit on install of replacement (subsection)' +testfailure grep '^non-free/oldlibs$' move-autobit.sections +testsuccess aptget install libzoo/stable -y +testdpkginstalled 'libzoo' +testdpkgnotinstalled 'libdef' 'libabc' + +testmarkedmanual 'libzoo' +testmarkedauto + +testsuccess aptget dist-upgrade -y +testdpkginstalled 'libzoo' 'libdef' + +testmarkedauto 'libzoo' +testmarkedmanual 'libdef' + +testsuccess apt autopurge -y +testdpkgnotinstalled 'libabc' 'libzoo' diff --git a/test/integration/test-apt-never-markauto-sections b/test/integration/test-apt-never-markauto-sections index a77d6b22b..b47966e75 100755 --- a/test/integration/test-apt-never-markauto-sections +++ b/test/integration/test-apt-never-markauto-sections @@ -8,12 +8,13 @@ configarchitecture 'amd64' 'i386' aptconfig dump --no-empty --format '%v%n' APT::Never-MarkAuto-Sections > nevermarkauto.sections testsuccess grep '^metapackages$' nevermarkauto.sections +testfailure grep '^universe/metapackages$' nevermarkauto.sections buildsimplenativepackage 'mydesktop' 'all' '1' 'unstable' 'Depends: mydesktop-core, foreignpkg Recommends: notavailable' '' 'metapackages' buildsimplenativepackage 'mydesktop-core' 'amd64' '1' 'unstable' 'Depends: bad-texteditor | texteditor, browser (>= 42), nosection, foreignpkg Recommends: notavailable -Multi-Arch: foreign' '' 'metapackages' +Multi-Arch: foreign' '' 'universe/metapackages' buildsimplenativepackage 'browser' 'amd64' '41' 'stable' buildsimplenativepackage 'browser' 'amd64' '42' 'unstable' buildsimplenativepackage 'texteditor' 'amd64' '1' 'stable' |
