diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:00:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:00:48 +0000 |
commit | 851b6a097165af4d51c0db01b5e05256e5006896 (patch) | |
tree | 5f7c388ec894a7806c49a99f3bdb605d0b299a7c /test/integration/test-resolver-delays-remove-decisions | |
parent | Initial commit. (diff) | |
download | apt-851b6a097165af4d51c0db01b5e05256e5006896.tar.xz apt-851b6a097165af4d51c0db01b5e05256e5006896.zip |
Adding upstream version 2.6.1.upstream/2.6.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | test/integration/test-resolver-delays-remove-decisions | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/test/integration/test-resolver-delays-remove-decisions b/test/integration/test-resolver-delays-remove-decisions new file mode 100755 index 0000000..8f0c7da --- /dev/null +++ b/test/integration/test-resolver-delays-remove-decisions @@ -0,0 +1,106 @@ +#!/bin/sh +set -e + +TESTDIR="$(readlink -f "$(dirname "$0")")" +. "$TESTDIR/framework" +setupenvironment +configarchitecture 'amd64' 'i386' + +insertinstalledpackage 'stuff' 'all' '1' + +insertpackage 'unstable' 'foobar' 'all' '1' 'Depends: foo | bar' +insertpackage 'unstable' 'foo' 'all' '1' 'Conflicts: stuff +Depends: foo-dep' +insertpackage 'unstable' 'foo-dep' 'all' '1' 'Depends: uninstallable' + +insertpackage 'unstable' 'bar' 'all' '1' + +setupaptarchive + +# We are needlessly removing "stuff" if we don't delay its marking here +# as we do not question the remove later on +testsuccessequal "Reading package lists... +Building dependency tree... + MarkInstall foobar:amd64 < none -> 1 @un puN Ib > FU=1 + Installing foo:amd64 as Depends of foobar:amd64 + Delayed Removing: stuff:amd64 as upgrade is not an option for foo:amd64 (1) + MarkInstall foo:amd64 < none -> 1 @un uN Ib > FU=0 + Installing foo-dep:amd64 as Depends of foo:amd64 + foo-dep:amd64 Depends on uninstallable:amd64 < none @un H > can't be satisfied! + foo:amd64 Depends on foo-dep:amd64 < none @un H > can't be satisfied! (dep) + Installing bar:amd64 as Depends of foobar:amd64 + MarkInstall bar:amd64 < none -> 1 @un uN > FU=0 +Starting pkgProblemResolver with broken count: 0 +Starting 2 pkgProblemResolver with broken count: 0 +Done +The following additional packages will be installed: + bar +The following NEW packages will be installed: + bar foobar +0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +Inst bar (1 unstable [all]) +Inst foobar (1 unstable [all]) +Conf bar (1 unstable [all]) +Conf foobar (1 unstable [all])" apt install foobar -s -o Debug::pkgProblemResolver=1 -o Debug::pkgDepCache::Marker=1 -o Debug::pkgDepCache::AutoInstall=1 + +insertinstalledpackage 'uninstallable' 'all' '1' + +testsuccessequal "Reading package lists... +Building dependency tree... + MarkInstall foobar:amd64 < none -> 1 @un puN Ib > FU=1 + Installing foo:amd64 as Depends of foobar:amd64 + Delayed Removing: stuff:amd64 as upgrade is not an option for foo:amd64 (1) + 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 K > FU=0 +Starting pkgProblemResolver with broken count: 0 +Starting 2 pkgProblemResolver with broken count: 0 +Done +The following additional packages will be installed: + foo foo-dep +The following packages will be REMOVED: + stuff +The following NEW packages will be installed: + foo foo-dep foobar + MarkDelete stuff:amd64 < 1 @ii K > FU=1 +0 upgraded, 3 newly installed, 1 to remove and 0 not upgraded. +Remv stuff [1] +Inst foo-dep (1 unstable [all]) +Inst foo (1 unstable [all]) +Inst foobar (1 unstable [all]) +Conf foo-dep (1 unstable [all]) +Conf foo (1 unstable [all]) +Conf foobar (1 unstable [all])" apt install foobar -s -o Debug::pkgProblemResolver=1 -o Debug::pkgDepCache::Marker=1 -o Debug::pkgDepCache::AutoInstall=1 + +# Same solution but the installs are considered protected now as there is no other solution +testsuccessequal "Reading package lists... +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 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 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 +Package 'bar' is not installed, so not removed +The following additional packages will be installed: + foo foo-dep +The following packages will be REMOVED: + stuff +The following NEW packages will be installed: + foo foo-dep foobar + MarkDelete stuff:amd64 < 1 | none @ii H > FU=1 +0 upgraded, 3 newly installed, 1 to remove and 0 not upgraded. +Remv stuff [1] +Inst foo-dep (1 unstable [all]) +Inst foo (1 unstable [all]) +Inst foobar (1 unstable [all]) +Conf foo-dep (1 unstable [all]) +Conf foo (1 unstable [all]) +Conf foobar (1 unstable [all])" apt install foobar bar- -q=0 -s -o Debug::pkgProblemResolver=1 -o Debug::pkgDepCache::Marker=1 -o Debug::pkgDepCache::AutoInstall=1 |