diff options
| author | Julian Andres Klode <jak@debian.org> | 2026-02-17 10:28:17 +0100 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2026-02-17 10:28:17 +0100 |
| commit | 9f3ecca2b32e4fe56a05811392e01416092f85fa (patch) | |
| tree | 9b82dec92f02559b91a2cf307044ecedcde4ab34 /test/integration/test-apt-get-upgrade-by-source | |
| parent | 1275e2e0ec45e9cdbfeedfa2c069274d80499fa8 (diff) | |
solver3: Upgrade by source package
Implement the "APT::Get::Upgrade-By-Source-Package" option as
the classic solver does.
Here this is equally straight forward now: We enqueue optional, but
eager, clauses of the form
foo=2 -> foo-data=2
for each sibling in the source version, assuming they are currently
installed, and the selection is not the current version.
This softly enforces upgrades of already installed siblings, but
in non-strict-pinning mode it will not affect the selection of
new packages to be installed.
A more complete solution to version selection by source package
also seems feasible, where we change the "priority" of versions
in the solver dynamically - currently they are statically evaluated.
Such that, when you select foo=2, and something installs foo-data,
foo-data would be installed in version 2 even if version 3 were its
candidate.
Diffstat (limited to 'test/integration/test-apt-get-upgrade-by-source')
| -rwxr-xr-x | test/integration/test-apt-get-upgrade-by-source | 52 |
1 files changed, 50 insertions, 2 deletions
diff --git a/test/integration/test-apt-get-upgrade-by-source b/test/integration/test-apt-get-upgrade-by-source index bac91f04a..8118ac1c3 100755 --- a/test/integration/test-apt-get-upgrade-by-source +++ b/test/integration/test-apt-get-upgrade-by-source @@ -22,6 +22,54 @@ noprogress() { testsuccessequal "Reading package lists... Building dependency tree... +Solving dependencies...Install pkg:arm64 () +[0] Install:pkg:arm64=2 () +Install pkg-bar:arm64 () +Install pkg-foo:arm64 () +[0] Reject:pkg:arm64=1 (pkg:arm64=2) +[0] Install:pkg:arm64 (pkg:arm64=2) +[1] Install:pkg-bar:arm64 () +[2] Install:pkg-foo:arm64 () +[3] Install:pkg-bar:arm64=2 (pkg:arm64=2) +[3] Reject:pkg-bar:arm64=1 (pkg:arm64=2 -> pkg-bar:arm64=2) +[4] Install:pkg-foo:arm64=2 (pkg:arm64=2) +[4] Reject:pkg-foo:arm64=1 (pkg:arm64=2 -> pkg-foo:arm64=2) + +The following additional packages will be installed: + pkg-bar pkg-foo +The following packages will be upgraded: + pkg pkg-bar pkg-foo +3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. +Inst pkg [1] (2 unstable [all]) +Inst pkg-bar [1] (2 unstable [all]) +Inst pkg-foo [1] (2 unstable [all]) +Conf pkg (2 unstable [all]) +Conf pkg-bar (2 unstable [all]) +Conf pkg-foo (2 unstable [all])" aptget install pkg -o debug::apt::solver=1 --solver 3.0 -s + +testsuccessequal "Reading package lists... +Building dependency tree... +Solving dependencies...Install pkg:arm64 () +[0] Install:pkg:arm64=2 () +Install pkg-bar:arm64 () +Install pkg-foo:arm64 () +[0] Reject:pkg:arm64=1 (pkg:arm64=2) +[0] Install:pkg:arm64 (pkg:arm64=2) +[1] Install:pkg-bar:arm64 () +[2] Install:pkg-foo:arm64 () +[3] Install:pkg-bar:arm64=1 (pkg-bar:arm64) +[3] Reject:pkg-bar:arm64=2 (pkg-bar:arm64 -> pkg-bar:arm64=1) +[4] Install:pkg-foo:arm64=1 (pkg-foo:arm64) +[4] Reject:pkg-foo:arm64=2 (pkg-foo:arm64 -> pkg-foo:arm64=1) + +The following packages will be upgraded: + pkg +1 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. +Inst pkg [1] (2 unstable [all]) +Conf pkg (2 unstable [all])" aptget install pkg -o debug::apt::solver=1 -o APT::Get::Upgrade-By-Source-Package=0 --solver 3.0 -s + +testsuccessequal "Reading package lists... +Building dependency tree... MarkInstall pkg:arm64 < 1 -> 2 @ii pumU > FU=1 Upgrading pkg-bar:arm64 < 1 | 2 @ii umH > due to pkg:arm64 Upgrading pkg-foo:arm64 < 1 | 2 @ii umH > due to pkg:arm64 @@ -38,7 +86,7 @@ Inst pkg-bar [1] (2 unstable [all]) Inst pkg-foo [1] (2 unstable [all]) Conf pkg (2 unstable [all]) Conf pkg-bar (2 unstable [all]) -Conf pkg-foo (2 unstable [all])" aptget install pkg -o debug::pkgdepcache::marker=1 -o Debug::pkgProblemResolver=1 -o Debug::pkgDepCache::AutoInstall=1 -s +Conf pkg-foo (2 unstable [all])" aptget install pkg -o debug::pkgdepcache::marker=1 -o Debug::pkgProblemResolver=1 -o Debug::pkgDepCache::AutoInstall=1 -s --solver internal testsuccessequal "Reading package lists... Building dependency tree... @@ -50,4 +98,4 @@ The following packages will be upgraded: pkg 1 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. Inst pkg [1] (2 unstable [all]) -Conf pkg (2 unstable [all])" aptget install pkg -o debug::pkgdepcache::marker=1 -o Debug::pkgProblemResolver=1 -o Debug::pkgDepCache::AutoInstall=1 -o APT::Get::Upgrade-By-Source-Package=0 -s +Conf pkg (2 unstable [all])" aptget install pkg -o debug::pkgdepcache::marker=1 -o Debug::pkgProblemResolver=1 -o Debug::pkgDepCache::AutoInstall=1 -o APT::Get::Upgrade-By-Source-Package=0 -s --solver internal |
