summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2021-04-29 08:26:11 +0000
committerJulian Andres Klode <jak@debian.org>2021-04-29 08:26:11 +0000
commit5d81ec308275b625a20b889fa3daa43815ddc80d (patch)
tree2bc62cbc973e58ec2f04ae4aa22bcef45b8a1519 /test
parentb942031ddfe5b40b527668a8561b5ab137632fd9 (diff)
parent6f01e7cc0c6f231711b3b81a81beb3775f0a855a (diff)
Merge branch 'pu/autoremove' into 'main'
Mark only provides from protected versioned kernel packages See merge request apt-team/apt!168
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/test-apt-get-autoremove-kernel-module-providers103
-rwxr-xr-xtest/integration/test-apt-get-autoremove-real-virtual-provider32
-rwxr-xr-xtest/integration/test-bug-604222-new-and-autoremove2
-rwxr-xr-xtest/integration/test-bug-618848-always-respect-user-requests8
-rwxr-xr-xtest/integration/test-bug-960705-propagate-protected-to-satisfied-conflict14
-rwxr-xr-xtest/integration/test-dpkg-i-apt-install-fix-broken2
-rwxr-xr-xtest/integration/test-resolver-delays-remove-decisions7
7 files changed, 150 insertions, 18 deletions
diff --git a/test/integration/test-apt-get-autoremove-kernel-module-providers b/test/integration/test-apt-get-autoremove-kernel-module-providers
new file mode 100755
index 000000000..76c003051
--- /dev/null
+++ b/test/integration/test-apt-get-autoremove-kernel-module-providers
@@ -0,0 +1,103 @@
+#!/bin/sh
+set -e
+
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
+setupenvironment
+configarchitecture 'amd64'
+
+insertinstalledpackage 'old-kernel-modules-0.8' 'all' '1' 'Depends: linux-image-0.8
+Provides: old-module
+Source: kernel-module'
+insertinstalledpackage 'old-kernel-modules-0.9' 'all' '1' 'Depends: linux-image-0.9
+Provides: old-module
+Source: kernel-module'
+insertinstalledpackage 'kernel-modules-1.0' 'all' '1' 'Depends: linux-image-1.0
+Provides: module
+Source: kernel-module'
+insertinstalledpackage 'kernel-modules-1.1' 'all' '2' 'Depends: linux-image-1.1
+Provides: module
+Source: kernel-module'
+insertinstalledpackage 'kernel-modules-1.2' 'all' '2' 'Depends: linux-image-1.2
+Provides: module
+Source: kernel-module'
+insertinstalledpackage 'kernel-modules-2.0' 'all' '2' 'Depends: linux-image-2.0
+Provides: module
+Source: kernel-module'
+insertinstalledpackage 'kernel-modules-2.1' 'all' '2' 'Depends: linux-image-2.1
+Provides: module
+Source: kernel-module'
+insertinstalledpackage 'texteditor-gtk' 'all' '2' 'Provides: editor
+Source: texteditor'
+insertinstalledpackage 'texteditor-kde' 'all' '2' 'Provides: editor
+Source: texteditor'
+
+insertinstalledpackage 'linux-image-0.8' 'all' '0.8' 'Provides: linux-image
+Source: linux-image'
+insertinstalledpackage 'linux-image-0.9' 'all' '0.9' 'Provides: linux-image
+Source: linux-image'
+insertinstalledpackage 'linux-image-1.0' 'all' '1.0' 'Provides: linux-image
+Source: linux-image'
+insertinstalledpackage 'linux-image-1.1' 'all' '1.1' 'Provides: linux-image
+Source: linux-image'
+insertinstalledpackage 'linux-image-1.2' 'all' '1.2' 'Provides: linux-image
+Source: linux-image'
+insertinstalledpackage 'linux-image-2.0' 'all' '2.0' 'Provides: linux-image
+Source: linux-image'
+insertinstalledpackage 'linux-image-2.1' 'all' '2.1' 'Provides: linux-image
+Source: linux-image'
+insertinstalledpackage 'has-needs' 'all' '1' 'Depends: editor, module, linux-image'
+insertinstalledpackage 'old-needs' 'all' '1' 'Depends: old-module'
+
+testsuccess aptmark auto 'linux-image-*' 'old-kernel-modules-*' 'kernel-modules-*' 'texteditor-*'
+testsuccessequal 'kernel-modules-1.0
+kernel-modules-1.1
+kernel-modules-1.2
+kernel-modules-2.0
+kernel-modules-2.1
+linux-image-0.8
+linux-image-0.9
+linux-image-1.0
+linux-image-1.1
+linux-image-1.2
+linux-image-2.0
+linux-image-2.1
+old-kernel-modules-0.8
+old-kernel-modules-0.9
+texteditor-gtk
+texteditor-kde' aptmark showauto
+
+testsuccess aptget check -s
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+Reading state information...
+The following packages will be REMOVED:
+ kernel-modules-1.0 kernel-modules-1.1 kernel-modules-1.2 linux-image-1.0
+ linux-image-1.1 linux-image-1.2
+0 upgraded, 0 newly installed, 6 to remove and 0 not upgraded.
+Remv kernel-modules-1.0 [1]
+Remv kernel-modules-1.1 [2]
+Remv kernel-modules-1.2 [2]
+Remv linux-image-1.0 [1.0]
+Remv linux-image-1.1 [1.1]
+Remv linux-image-1.2 [1.2]' apt autoremove -s
+
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+Reading state information...
+The following packages will be REMOVED:
+ kernel-modules-1.0 kernel-modules-1.1 kernel-modules-1.2 linux-image-0.8
+ linux-image-0.9 linux-image-1.0 linux-image-1.1 linux-image-1.2
+ old-kernel-modules-0.8 old-kernel-modules-0.9 old-needs
+0 upgraded, 0 newly installed, 11 to remove and 0 not upgraded.
+Remv kernel-modules-1.0 [1]
+Remv kernel-modules-1.1 [2]
+Remv kernel-modules-1.2 [2]
+Remv old-needs [1]
+Remv old-kernel-modules-0.8 [1]
+Remv linux-image-0.8 [0.8]
+Remv old-kernel-modules-0.9 [1]
+Remv linux-image-0.9 [0.9]
+Remv linux-image-1.0 [1.0]
+Remv linux-image-1.1 [1.1]
+Remv linux-image-1.2 [1.2]' apt autoremove -s old-needs-
diff --git a/test/integration/test-apt-get-autoremove-real-virtual-provider b/test/integration/test-apt-get-autoremove-real-virtual-provider
new file mode 100755
index 000000000..4940ab5ff
--- /dev/null
+++ b/test/integration/test-apt-get-autoremove-real-virtual-provider
@@ -0,0 +1,32 @@
+#!/bin/sh
+set -e
+
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
+setupenvironment
+configarchitecture 'amd64'
+
+insertinstalledpackage 'needs' 'all' '1'
+insertinstalledpackage 'needs-provider1' 'all' '1' 'Provides: needs (= 1)'
+insertinstalledpackage 'needs-provider2' 'all' '1' 'Provides: needs (= 2)'
+insertinstalledpackage 'needs-provider3' 'all' '1' 'Provides: needs (= 3)'
+insertinstalledpackage 'needs-provider4' 'all' '1' 'Provides: needs (= 4)'
+
+insertinstalledpackage 'foo' 'all' '1' 'Depends: needs (= 1), needs (= 2), needs (= 3)'
+
+testsuccess aptmark auto 'needs*'
+testsuccessequal 'needs
+needs-provider1
+needs-provider2
+needs-provider3
+needs-provider4' aptmark showauto
+
+testsuccess aptget check -s
+
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+Reading state information...
+The following packages will be REMOVED:
+ needs-provider4
+0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
+Remv needs-provider4 [1]' aptget autoremove -s
diff --git a/test/integration/test-bug-604222-new-and-autoremove b/test/integration/test-bug-604222-new-and-autoremove
index aaeac09a8..534c50b80 100755
--- a/test/integration/test-bug-604222-new-and-autoremove
+++ b/test/integration/test-bug-604222-new-and-autoremove
@@ -88,8 +88,6 @@ Building dependency tree...
MarkInstall libopenal-dev:i386 < none -> 1:1.12.854-2 @un puN > FU=0
Ignore MarkGarbage of libopenal-dev:i386 < none -> 1:1.12.854-2 @un puN > as its mode (Install) is protected
Ignore MarkGarbage of libavcodec52:i386 < none -> 4:0.5.2-6 @un puN > as its mode (Install) is protected
- Ignore MarkGarbage of libopenal-dev:i386 < none -> 1:1.12.854-2 @un puN > as its mode (Install) is protected
- Ignore MarkGarbage of libavcodec52:i386 < none -> 4:0.5.2-6 @un puN > as its mode (Install) is protected
The following additional packages will be installed:
libavcodec52 libopenal-dev
The following NEW packages will be installed:
diff --git a/test/integration/test-bug-618848-always-respect-user-requests b/test/integration/test-bug-618848-always-respect-user-requests
index 1e144f1ee..f77c384c2 100755
--- a/test/integration/test-bug-618848-always-respect-user-requests
+++ b/test/integration/test-bug-618848-always-respect-user-requests
@@ -15,11 +15,11 @@ setupaptarchive
testsuccessequal "Reading package lists...
Building dependency tree...
- MarkDelete libdb4.8:i386 < 1.0 @ii pmK > FU=1
- MarkDelete exim4-daemon-light:i386 < 1.0 @ii mK Ib > FU=0
+ MarkDelete libdb4.8:i386 < 1.0 @ii pK > FU=1
+ MarkDelete exim4-daemon-light:i386 < 1.0 @ii K Ib > FU=0
MarkInstall exim4-daemon-heavy:i386 < none -> 1.0 @un uN Ib > FU=0
- exim4-daemon-heavy:i386 Depends on libdb4.8:i386 < 1.0 @ii pmR > can't be satisfied! (dep)
- MarkDelete exim4:i386 < 1.0 @ii mK Ib > FU=0
+ exim4-daemon-heavy:i386 Depends on libdb4.8:i386 < 1.0 @ii pR > can't be satisfied! (dep)
+ MarkDelete exim4:i386 < 1.0 @ii K Ib > FU=0
The following packages will be REMOVED:
exim4 exim4-daemon-light libdb4.8
MarkDelete exim4:i386 < 1.0 @ii K > FU=1
diff --git a/test/integration/test-bug-960705-propagate-protected-to-satisfied-conflict b/test/integration/test-bug-960705-propagate-protected-to-satisfied-conflict
index ad1501b66..824851278 100755
--- a/test/integration/test-bug-960705-propagate-protected-to-satisfied-conflict
+++ b/test/integration/test-bug-960705-propagate-protected-to-satisfied-conflict
@@ -18,24 +18,24 @@ setupaptarchive
testsuccessequal "Reading package lists...
Building dependency tree...
Removing: systemd-sysv:amd64 as upgrade is not an option for runit-init:amd64 (1)
- MarkDelete systemd-sysv:amd64 < 1 @ii mK > FU=0
+ MarkDelete systemd-sysv:amd64 < 1 @ii K > FU=0
MarkInstall runit-init:amd64 < none -> 1 @un puN > FU=1
Starting pkgProblemResolver with broken count: 1
Starting 2 pkgProblemResolver with broken count: 1
-Investigating (0) init:amd64 < 1 @ii mK Ib >
-Broken init:amd64 PreDepends on systemd-sysv:amd64 < 1 @ii pmR >
+Investigating (0) init:amd64 < 1 @ii K Ib >
+Broken init:amd64 PreDepends on systemd-sysv:amd64 < 1 @ii pR >
Considering systemd-sysv:amd64 0 as a solution to init:amd64 5100
Added systemd-sysv:amd64 to the remove list
Broken init:amd64 PreDepends on sysvinit-core:amd64 < none @un pH >
Considering sysvinit-core:amd64 0 as a solution to init:amd64 5100
- Ignore MarkKeep of systemd-sysv:amd64 < 1 @ii pmR > as its mode (Delete) is protected
-Investigating (1) init:amd64 < 1 @ii mK Ib >
-Broken init:amd64 PreDepends on systemd-sysv:amd64 < 1 @ii pmR >
+ Ignore MarkKeep of systemd-sysv:amd64 < 1 @ii pR > as its mode (Delete) is protected
+Investigating (1) init:amd64 < 1 @ii K Ib >
+Broken init:amd64 PreDepends on systemd-sysv:amd64 < 1 @ii pR >
Considering systemd-sysv:amd64 5100 as a solution to init:amd64 5100
Broken init:amd64 PreDepends on sysvinit-core:amd64 < none @un pH >
Considering sysvinit-core:amd64 0 as a solution to init:amd64 5100
Or group remove for init:amd64
- MarkDelete init:amd64 < 1 @ii mK Ib > FU=0
+ MarkDelete init:amd64 < 1 @ii K Ib > FU=0
Done
The following packages will be REMOVED:
init systemd-sysv
diff --git a/test/integration/test-dpkg-i-apt-install-fix-broken b/test/integration/test-dpkg-i-apt-install-fix-broken
index 8d800ffb7..0b75b5fb1 100755
--- a/test/integration/test-dpkg-i-apt-install-fix-broken
+++ b/test/integration/test-dpkg-i-apt-install-fix-broken
@@ -14,7 +14,7 @@ setupaptarchive
testfailure dpkg -i incoming/autopkgtest-*.deb
testsuccessequal 'Reading package lists...
Building dependency tree...
-Correcting dependencies... MarkInstall autopkgtest-satdep:amd64 < 1 @iU mK Nb Ib > FU=0
+Correcting dependencies... MarkInstall autopkgtest-satdep:amd64 < 1 @iU K Nb Ib > FU=0
MarkInstall debhelper:amd64 < none -> 1 @un uN > FU=0
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
diff --git a/test/integration/test-resolver-delays-remove-decisions b/test/integration/test-resolver-delays-remove-decisions
index d8dfd7c9a..8f0c7daa5 100755
--- a/test/integration/test-resolver-delays-remove-decisions
+++ b/test/integration/test-resolver-delays-remove-decisions
@@ -53,7 +53,7 @@ Building dependency tree...
MarkInstall foo:amd64 < none -> 1 @un uN Ib > FU=0
Installing foo-dep:amd64 as Depends of foo:amd64
MarkInstall foo-dep:amd64 < none -> 1 @un uN > FU=0
- MarkDelete stuff:amd64 < 1 @ii mK > FU=0
+ MarkDelete stuff:amd64 < 1 @ii K > FU=0
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done
@@ -79,16 +79,15 @@ Building dependency tree...
MarkInstall foobar:amd64 < none -> 1 @un puN Ib > FU=1
Installing foo:amd64 as Depends of foobar:amd64
Removing: stuff:amd64 as upgrade is not an option for foo:amd64 (1)
- MarkDelete stuff:amd64 < 1 @ii mK > FU=0
+ MarkDelete stuff:amd64 < 1 @ii K > FU=0
MarkInstall foo:amd64 < none -> 1 @un puN Ib > FU=0
Installing foo-dep:amd64 as Depends of foo:amd64
MarkInstall foo-dep:amd64 < none -> 1 @un puN > FU=0
- MarkInstall uninstallable:amd64 < 1 @ii pmK > FU=0
+ MarkInstall uninstallable:amd64 < 1 @ii pK > FU=0
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done
Ignore MarkGarbage of foo:amd64 < none -> 1 @un puN > as its mode (Install) is protected
- Ignore MarkGarbage of foo:amd64 < none -> 1 @un puN > as its mode (Install) is protected
Package 'bar' is not installed, so not removed
The following additional packages will be installed:
foo foo-dep