summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Release 2.9.352.9.35Julian Andres Klode2025-03-275-6/+15
|
* Merge branch 'more-friendly-pager' into 'main'Julian Andres Klode2025-03-262-2/+2
|\ | | | | | | | | pager: Also set SMK in LESS, fix LV=C to be LV=-c See merge request apt-team/apt!470
| * pager: Also set SMK in LESS, fix LV=C to be LV=-cJulian Andres Klode2025-03-262-2/+2
|/ | | | | | | | | | | Sync the LESS environment with systemd to make it more user-friendly than just a blinking colon: - S disables the terminal bell - M makes the output verbose, so the prompt is not ":" but "lines 1-n" - K means that Ctrl+c exits the command Also fix the LV= environment variable to use -c and not C.
* Merge branch 'solver3-crash-escape' into 'main'Julian Andres Klode2025-03-262-1/+38
|\ | | | | | | | | solver3: Correctly deb822-escape error message in evaluation report See merge request apt-team/apt!469
| * solver3: Correctly deb822-escape error message in evaluation reportJulian Andres Klode2025-03-262-1/+38
|/ | | | | | The error messages are multi-line now, so need correct escaping. LP: #2104276
* Merge branch 'fix-pager-env' into 'main'Julian Andres Klode2025-03-262-1/+14
|\ | | | | | | | | Respect custom LESS/MORE/LV variables See merge request apt-team/apt!468
| * Respect custom LESS/MORE/LV variablesJulian Andres Klode2025-03-262-1/+14
|/ | | | | | Use setenv() to avoid overriding user defined variables. LP: #2103921
* Release 2.9.342.9.34Julian Andres Klode2025-03-2015-256/+722
|
* Merge branch 'solver3' into 'main'Julian Andres Klode2025-03-204-1/+41
|\ | | | | | | | | solver3: Handle previously satisfied Suggests last See merge request apt-team/apt!467
| * solver3: Do not install new packages for SuggestsJulian Andres Klode2025-03-202-27/+6
| | | | | | | | | | | | | | | | | | | | As a followup to the previous commit, restore the exact behavior of the old solver to break the Suggests on upgrade here by erasing any choices not previously installed. This ensures that the Suggests never installs any new package, but it will still retain previously installed packages when solver3 is doing autoremove.
| * solver3: Handle previously satisfied Suggests lastJulian Andres Klode2025-03-204-1/+62
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In #2103556 we can see that avahi-daemon Suggests avahi-autoipd, which is previously satisfied by dhcpcd-base due to a Provides; that Provides has now been dropped; and solver3 keeps the update back. As in LP: #2102720 this is a Suggests and it seems wrong for the Suggests to actually influence dependency choices and be able to hold back updates. Instead, satisfy previously satisfied Suggests at the end. For the particular case in this bug report, this results in avahi-autoipd, the real package, to be installed to keep the Suggests working which needs further consideration whether that is the right choice (we can argue either way), but in any case this is a better solution. This in turn breaks the conkeror test which is a somewhat awkward unrealistic test these days as it has no automatically installed packages; because previously something must have had a Suggests on say libdatrie1 or something that was processed first. This would be fine before 5daf6dbfd272be2f8e3c59d4bab4be8c119b7aa1 but as of that commit we no longer rewrite conkeror Depends xulrunner-1.9 | xulrunner-1.9.1 into conkeror Depends xulrunner-1.9.1 | xulrunner-1.9 Because xulrunner-1.9 is manually installed. Mark xulrunner-1.9 as automatically installed to fix the test case. The resulting behavior seems correct: If you manually want xulrunner-1.9 specifically we should not replace it with xulrunner-1.9.1; but if it's automatically installed we should. LP: #2103556
* Merge branch 'solver3' into 'main'Julian Andres Klode2025-03-203-105/+27
|\ | | | | | | | | Various solver bug fixes See merge request apt-team/apt!466
| * solver3: Avoid empty error message in evaluation crash reportJulian Andres Klode2025-03-202-4/+6
| | | | | | | | whoopsie does not accept empty values
| * solver3: Use zstd-compressed, base64-encoded dumpsJulian Andres Klode2025-03-202-99/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | Store the solver dumps with zstd compression and base64-encode them in the crash report; such that they take up significantly less space and can fit in cassandra's schema. Base64 is wrapped at 76 characters as the base64 tool does. Do some magic std::string_view conversion to avoid string copies for the substr() used to get 76 characters at a time. Note we can rely on substr(i, 76) to handle less than 76 characters just fine; it uses std::min(76, size() - i) characters.
| * solver3: Record manual flag before discovering packagesJulian Andres Klode2025-03-201-2/+5
|/ | | | | | | | | | | | | | | | When discovering packages we look at the manual flag to avoid reordering obsolete manually installed packages last. We inadvertently initialized that flag interlaced with discovering packages so if we discovered packages depending on obsolete, but manually installed, packages first, we were not aware they were manually installed and demoted them. I am struggling to come up with a test case for this as I can't get the package objects in the cache to be in the right order for the bug to trigger. LP: #2102720
* Merge branch 'smaller-dumps' into 'main'Julian Andres Klode2025-03-205-5/+52
|\ | | | | | | | | Write minimized EDSP dumps in crash report, Dir::log::solver See merge request apt-team/apt!465
| * edsp: Dump minimized Dir::Log::Solver logsJulian Andres Klode2025-03-201-1/+1
| |
| * solver evaluation: write minimized solver dumpsJulian Andres Klode2025-03-202-3/+4
| | | | | | | | These are faster to generate and significantly smaller.
| * edsp: Add functionality to only write relevant packagesJulian Andres Klode2025-03-202-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | Add a variant of WriteLimitedScenario that does not take a pkgset, but creates one on the fly based on the transitive closure of installed packages, to be installed packages, and their dependencies and provides. This includes more packages than strictly necessary, i.e. we do not really need to include foo just because a package we want to install Conflicts with it, but oh well, this is easy to read. Trying to extend the filtering is hard as the dependencies being written are also filtered...
| * zstd: The compressor level should be -6, not -19Julian Andres Klode2025-03-201-1/+1
|/ | | | | We created a very slow zstd, we don't default to high levels for other compressors...
* Merge branch 'doc/snapshot' into 'main'Julian Andres Klode2025-03-141-17/+28
|\ | | | | | | | | doc/sources.list.5.xml: snapshot facts See merge request apt-team/apt!460
| * doc/sources.list.5.xml: snapshot infosChristopher Bock2025-03-141-17/+28
|/ | | | | * rephrase information about possible snapshot values * add snapshot example configurations
* Merge branch 'indextargets-signed-by' into 'main'Julian Andres Klode2025-03-144-13/+21
|\ | | | | | | | | apt-pkg/solver3.h: avoid static_assert(false) and signed-by in apt-get indextargets See merge request apt-team/apt!464
| * cmdline/apt-get.cc: emit Signed-By field and support $(SIGNED_BY) in apt-get ↵Johannes Schauer Marin Rodrigues2025-03-143-12/+18
| | | | | | | | indextargets --format
| * apt-pkg/solver3.h: avoid static_assert(false)Johannes Schauer Marin Rodrigues2025-03-141-1/+3
|/ | | | | | | | | | | | | | | | | With older compilers (g++ and clang from Bookworm), static_assert(false) will result in: /home/josch/git/apt/build/include/apt-pkg/solver3.h:52:24: error: static assertion failed: Cannot construct map for key type 52 | static_assert(false, "Cannot construct map for key type"); | ^~~~~ This commit implements the terrible but more valid workaround according to: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2593r0.html Original solution from here: https://stackoverflow.com/questions/14637356/static-assert-fails-compilation-even-though-template-function-is-called-nowhere/14637534#14637534 That way, apt will compile with compilers in Bookworm again.
* Merge branch 'solver3' into 'main'Julian Andres Klode2025-03-133-6/+45
|\ | | | | | | | | solver3: Only hide ver->pkg clauses, not pkg->ver version selection ones See merge request apt-team/apt!462
| * solver3: Only hide ver->pkg clauses, not pkg->ver version selection onesJulian Andres Klode2025-03-133-6/+45
|/ | | | | | | | Particularly as Helmut pointed out we need to show which version we selected for install if there is only one but there is a versioned conflicts. Reported-By: Helmut Grohne <helmut@subdivi.de> on IRC
* Release 2.9.332.9.33Julian Andres Klode2025-03-125-6/+22
|
* Merge branch 'solver3' into 'main'Julian Andres Klode2025-03-126-22/+62
|\ | | | | | | | | solver3: Fix Recommends/Suggests vs Enhances confusion See merge request apt-team/apt!461
| * solver3: Fix test-resolve-by-keep-new-recommendJulian Andres Klode2025-03-123-21/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reorder the if branches a bit to simplify the understanding of the promotions, and allow us to keep track of which dependency existed in the installed version. Change the rule for promoting new recommends to only promote new recommends to depends in *upgrade* and not *dist-upgrade* per the test-resolve-by-keep-new-recommends test case. This makes some sense: In a dist-upgrade, the solver could otherwise decide to remove an installed package if both the following hold: (1) something needs the upgraded version | something else (2) the upgraded version is not installable due to unsat recommends
| * solver3: Fix Recommends/Suggests vs Enhances confusionJulian Andres Klode2025-03-123-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We accidentally considered an Enhances a reason to keep a package installed, which of course it is not, fix the determination of "existing soft dependency" to only include soft dependencies that should keep a package installed in the autoremover to solve the issue. This also fixes edsp/mantic-upgrade-rel-to-2024-05-29.edsp to not install llvm-13-dev for clang-13 which is an installed package with no upgrade. Also ensure we stop after the first match; the DependsList() is ordered by decreasing priority and we don't want to override Recommends by Suggests in case a package declares both... LP: #2101800
| * test: Fix some weird editing artefactJulian Andres Klode2025-03-121-1/+1
|/
* Merge branch 'solver3' into 'main'Julian Andres Klode2025-03-104-12/+90
|\ | | | | | | | | solver3: Various bug fixes See merge request apt-team/apt!459
| * solver3: Correctly determine 'same' or groupsJulian Andres Klode2025-03-102-9/+47
| | | | | | | | | | | | We incorrectly used the DependencyData of the first or group member, however that only checked that the first or group member was the same and that both either had a next member or not.
| * solver3: Print correct reason when registering dependencyJulian Andres Klode2025-03-101-2/+1
| | | | | | | | This is relevant when debugging common dependencies.
| * solver3: Fix detection of satisfied recommends for pkg variablesJulian Andres Klode2025-03-101-1/+1
| | | | | | | | This only worked for version literals lol
| * edsp: Set Forbid-New-Install/Forbid-Remove: no if other is setJulian Andres Klode2025-03-102-0/+41
|/ | | | | | | | The upgrade code may also set Upgrade: yes, and this sets both to yes, so `apt upgrade` dumps behave like `apt-get upgrade` ones, which of course is not intentional. moo
* Release 2.9.32Julian Andres Klode2025-03-0948-201/+889
|
* Merge branch 'solver3' into 'main'Julian Andres Klode2025-03-093-7/+17
|\ | | | | | | | | solver3: Do not prefer new installs over manually installed obsoletes See merge request apt-team/apt!458
| * solver3: Do not prefer new installs over manually installed obsoletesJulian Andres Klode2025-03-093-7/+17
|/ | | | | | | | | | Only move obsolete packages last that are automatically installed, as we don't want to remove manually installed obsolete packages. Add some missing const annotations to the operator[] arguments as well that were needed. LP: #2100247
* Merge branch 'transaction' into 'main'Julian Andres Klode2025-03-098-86/+597
|\ | | | | | | | | Run 3.0 solver if internal is unsuccessful or we have apport for automatic solver evaluation See merge request apt-team/apt!446
| * Print --solver 3.0 explanation if both internal and it failedJulian Andres Klode2025-03-094-1/+26
| | | | | | | | | | | | | | | | | | | | This can provide useful additional context. To avoid updating the whole test suite for it, introduce a new option `quiet::NoSolver3Explanation` and set it by default. All the other tests that assert output will already have matching tests for --solver 3.0 with the correct messages asserted, it makes no sense to duplicate them.
| * Evaluate and fall back to the 3.0 solverJulian Andres Klode2025-03-095-86/+446
| | | | | | | | | | | | | | | | | | | | | | | | Always run the 3.0 solver after the internal solver. If the internal solver failed, and the 3.0 solver did not, use the 3.0 result. If 3.0 solver failed or produced a worse result than the internal solver, write an apport crash dump. We exclude situations which we now the solver can't handle, i.e. removals are forbidden and you requested removals, and stuff like that.
| * depcache: Add a new UpgradeCount() memberJulian Andres Klode2025-03-092-0/+17
| |
| * Introduce pkgDepCache::Transaction for transactional depcache updatesJulian Andres Klode2025-03-092-0/+109
|/
* Merge branch 'solver3' into 'main'Julian Andres Klode2025-03-0830-113/+654
|\ | | | | | | | | solver3: Verbose error messages and some bugfixes See merge request apt-team/apt!457
| * solver3: Verbose error messagesJulian Andres Klode2025-03-0830-80/+609
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a new function, LongWhyStr() that returns a longer reason for why something is being installed (or not). This does the same path walk as the other function does, but it renders the clauses at each level, and one per line, so the whole output is a lot more informative. It is a separate function to keep the existing debug messages use the simple single line implication graph We remove the other special case in AddWork() for empty solutions to mke use of the general case in Solve() instead, and then adapt the case in Solve() to the same case as in Enqueue(). This also happens to fix the bug that when we encountered an empty clause we just printed the clause had no solution, but not how we got to install the package with the clause. Adapt the test suite for the changes which is an annoying amount of paperwork.
| * solver3: bestReason: Only find actual assignmentsJulian Andres Klode2025-03-071-1/+5
| | | | | | | | | | | | | | | | | | | | I marked exim4-daemon-light for install, which marked exim4-daemon-heavy for not install, but now in postfix Conflicts: mail-transport-agent we saw "not exim4-daemon-heavy" as the reason for not installing postfix. Oh noes.
| * solver3: Support pretty printing clausesJulian Andres Klode2025-03-062-6/+17
| | | | | | | | | | This will print the underlying dependency which is nicer to read.
| * solver3: cleanup operators for VarJulian Andres Klode2025-03-061-8/+3
| | | | | | | | Particularly, use single line and implement operator!=