diff options
| author | Julian Andres Klode <jak@debian.org> | 2025-03-09 13:29:29 +0000 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2025-03-09 13:29:29 +0000 |
| commit | 153bbf448f91eb347574624890c36f97cd168b53 (patch) | |
| tree | 8f5f98fbe27ac7060b38e545eb43317215f1ae89 /test | |
| parent | 1e7f123ea59d6ae3af74725d4dab846f81d122e8 (diff) | |
| parent | 6c112f9860c1730237029f4e23d40bf658d73704 (diff) | |
Merge branch 'transaction' into 'main'
Run 3.0 solver if internal is unsuccessful or we have apport for automatic solver evaluation
See merge request apt-team/apt!446
Diffstat (limited to 'test')
| -rw-r--r-- | test/integration/framework | 2 | ||||
| -rwxr-xr-x | test/integration/test-bug-745046-candidate-propagation-fails | 1 | ||||
| -rwxr-xr-x | test/integration/test-release-candidate-switching | 1 | ||||
| -rwxr-xr-x | test/integration/test-solver3-evaluation | 239 |
4 files changed, 243 insertions, 0 deletions
diff --git a/test/integration/framework b/test/integration/framework index d2570b6b2..3f0290569 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -589,6 +589,8 @@ EOF echo 'DPkg::Path "";' >> aptconfig.conf echo 'Dir::Bin::ischroot "/bin/false";' >> aptconfig.conf + echo 'quiet::NoSolver3Explanation "true";' > rootdir/etc/apt/apt.conf.d/disable-solver3-context + # most tests just need one signed Release file, not both export APT_DONT_SIGN='Release.gpg' diff --git a/test/integration/test-bug-745046-candidate-propagation-fails b/test/integration/test-bug-745046-candidate-propagation-fails index 8475a4ea1..f4fc15e0e 100755 --- a/test/integration/test-bug-745046-candidate-propagation-fails +++ b/test/integration/test-bug-745046-candidate-propagation-fails @@ -17,6 +17,7 @@ setupaptarchive testfailureequal "Reading package lists... Building dependency tree... Selected version '2' (experimental [amd64]) for 'gedit' +Selected version '2' (experimental [amd64]) for 'gedit' Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created diff --git a/test/integration/test-release-candidate-switching b/test/integration/test-release-candidate-switching index be5b3f997..52d3e5a12 100755 --- a/test/integration/test-release-candidate-switching +++ b/test/integration/test-release-candidate-switching @@ -424,6 +424,7 @@ E: Trivial Only specified but this is not a trivial operation." aptget install a testfailureequal "Reading package lists... Building dependency tree... Selected version '1.0' (experimental [all]) for 'uninstallablepkg' +Selected version '1.0' (experimental [all]) for 'uninstallablepkg' Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created diff --git a/test/integration/test-solver3-evaluation b/test/integration/test-solver3-evaluation new file mode 100755 index 000000000..af12698b5 --- /dev/null +++ b/test/integration/test-solver3-evaluation @@ -0,0 +1,239 @@ +#!/bin/sh +set -e + +TESTDIR="$(readlink -f "$(dirname "$0")")" +. "$TESTDIR/framework" +setupenvironment +configarchitecture 'amd64' + +insertinstalledpackage 'apport' 'all' '3' + +insertpackage 'unstable' 'x' 'all' '3' 'Depends: a | b' +insertpackage 'unstable' 'y' 'all' '3' 'Depends: b | a' +insertpackage 'unstable' 'a' 'all' '3' 'Depends: c' +insertpackage 'unstable' 'b' 'all' '3' +insertpackage 'unstable' 'c' 'all' '3' + +setupaptarchive + +rm rootdir/etc/apt/apt.conf.d/disable-solver3-context +mkdir rootdir/var/log/apt + +testsuccess aptget install y x --solver internal -s -o Dir::Apport=var/crash + +testsuccess sed -i "s/^Date:.*/Date: Sun Mar 9 00:08:41 2025/" rootdir/var/crash/apt-edsp.$(id -u).crash + +testsuccessequal "ProblemType: AptSolver +Architecture: amd64 +Date: Sun Mar 9 00:08:41 2025 +Package: apt +Title: Failure: The 3.0 solver produced a worse result +SourcePackage: apt +ErrorMessage: +AptSolverDump: + Request: EDSP 0.5 + Architecture: amd64 + Architectures: amd64 + Machine-ID: 912e43bd1c1d4ba481f9f8ccab25f9ee + Install: x:amd64 y:amd64 + Solver: internal + + Package: a + Architecture: all + Version: 3 + APT-ID: 2 + Source: a + Source-Version: 3 + Priority: optional + Section: other + Size: 42 + APT-Release: + a=unstable,n=sid,c=main,b=all + APT-Pin: 500 + APT-Candidate: yes + Depends: c + + Package: b + Architecture: all + Version: 3 + APT-ID: 3 + Source: b + Source-Version: 3 + Priority: optional + Section: other + Size: 42 + APT-Release: + a=unstable,n=sid,c=main,b=all + APT-Pin: 500 + APT-Candidate: yes + + Package: c + Architecture: all + Version: 3 + APT-ID: 4 + Source: c + Source-Version: 3 + Priority: optional + Section: other + Size: 42 + APT-Release: + a=unstable,n=sid,c=main,b=all + APT-Pin: 500 + APT-Candidate: yes + + Package: x + Architecture: all + Version: 3 + APT-ID: 0 + Source: x + Source-Version: 3 + Priority: optional + Section: other + Size: 42 + APT-Release: + a=unstable,n=sid,c=main,b=all + APT-Pin: 500 + APT-Candidate: yes + Depends: a | b + + Package: y + Architecture: all + Version: 3 + APT-ID: 1 + Source: y + Source-Version: 3 + Priority: optional + Section: other + Size: 42 + APT-Release: + a=unstable,n=sid,c=main,b=all + APT-Pin: 500 + APT-Candidate: yes + Depends: b | a + + Package: apport + Architecture: all + Version: 3 + APT-ID: 5 + Source: apport + Source-Version: 3 + Priority: optional + Section: other + Installed: yes + APT-Pin: 100 + APT-Candidate: yes + " cat rootdir/var/crash/apt-edsp.$(id -u).crash + + +testsuccessequal "Request: EDSP 0.5 +Architecture: amd64 +Architectures: amd64 +Machine-ID: 912e43bd1c1d4ba481f9f8ccab25f9ee +Install: x:amd64 y:amd64 +Solver: internal + +Package: a +Architecture: all +Version: 3 +APT-ID: 2 +Source: a +Source-Version: 3 +Priority: optional +Section: other +Size: 42 +APT-Release: + a=unstable,n=sid,c=main,b=all +APT-Pin: 500 +APT-Candidate: yes +Depends: c + +Package: b +Architecture: all +Version: 3 +APT-ID: 3 +Source: b +Source-Version: 3 +Priority: optional +Section: other +Size: 42 +APT-Release: + a=unstable,n=sid,c=main,b=all +APT-Pin: 500 +APT-Candidate: yes + +Package: c +Architecture: all +Version: 3 +APT-ID: 4 +Source: c +Source-Version: 3 +Priority: optional +Section: other +Size: 42 +APT-Release: + a=unstable,n=sid,c=main,b=all +APT-Pin: 500 +APT-Candidate: yes + +Package: x +Architecture: all +Version: 3 +APT-ID: 0 +Source: x +Source-Version: 3 +Priority: optional +Section: other +Size: 42 +APT-Release: + a=unstable,n=sid,c=main,b=all +APT-Pin: 500 +APT-Candidate: yes +Depends: a | b + +Package: y +Architecture: all +Version: 3 +APT-ID: 1 +Source: y +Source-Version: 3 +Priority: optional +Section: other +Size: 42 +APT-Release: + a=unstable,n=sid,c=main,b=all +APT-Pin: 500 +APT-Candidate: yes +Depends: b | a + +Package: apport +Architecture: all +Version: 3 +APT-ID: 5 +Source: apport +Source-Version: 3 +Priority: optional +Section: other +Installed: yes +APT-Pin: 100 +APT-Candidate: yes +" cat rootdir/var/log/apt/edsp.log + +testfailureequal "Reading package lists... +Building dependency tree... +Package 'c' is not installed, so not removed +Solving dependencies... +Some packages could not be installed. This may mean that you have +requested an impossible situation or if you are using the unstable +distribution that some required packages have not yet been created +or been moved out of Incoming. +The following information may help to resolve the situation: + +The following packages have unmet dependencies: + a : Depends: c but it is not going to be installed +E: Unable to correct problems, you have held broken packages. +E: The following information from --solver 3.0 may provide additional context: + Unable to satisfy dependencies. Reached two conflicting decisions: + 1. a:amd64=3 is selected for install + 2. a:amd64 Depends c + but none of the choices are installable: + - c:amd64 is not selected for install" apt install -s a c- --solver internal |
