summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Release 2.9.52.9.5Julian Andres Klode2024-06-1315-53/+110
|
* Merge branch 'snapshot-typo' into 'main'Julian Andres Klode2024-06-131-1/+1
|\ | | | | | | | | Fix spelling of @SNAPSHOTID@ in apt.conf.5.xml See merge request apt-team/apt!353
| * Fix spelling of @SNAPSHOTID@ in apt.conf.5.xmlNoah Meyerhans2024-05-291-1/+1
| | | | | | | | Closes: #1072189
* | Merge branch 'edsp-source-version' into 'main'Julian Andres Klode2024-06-132-1/+15
|\ \ | | | | | | | | | | | | edsp: Parse source version from the Source-Version field See merge request apt-team/apt!354
| * | edsp: Parse source version from the Source-Version fieldJulian Andres Klode2024-05-302-1/+15
| |/ | | | | | | | | | | | | | | | | EDSP uses the Source-Version field instead of storing the source version in the Source field with the package name, adjust our parser accordingly. Use the override in the edspLikeListParser to do so rather than dumb this into the correct place in the debListParser.
* | Merge branch 'solver3-group' into 'main'Julian Andres Klode2024-06-134-59/+123
|\ \ | | | | | | | | | | | | solver3: Group work items; and helpers See merge request apt-team/apt!356
| * | solver3: Order obsolete choices lastJulian Andres Klode2024-06-133-8/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This has two aspects: 1. For a dependency A | B | C we order the obsolete packages last, that is, if A is obsolete, this gets reordered to B | C | A, such that we try to pick non-obsolete packages first to ease upgrade calculation. 2. When comparing two dependencies, we order dependencies into three groups: First we satisfy dependencies mentioning only non-installed (NEW) packages, then we satisfy "normal" dependencies, and finally we satisfy any dependencies mentioning obsolete packages. This means for example if you have obsolete libfoo1 and a new libfoo1t64, that we will see Depends: libfoo1t64 before any Depends: libfoo1 (which may expand to libfoo1 | libfoo1t64), so we effectively will have selected "replacement" packages this way already before getting to older packages where we would have to choose between the obsolete package and its replacement.
| * | solver3: Remove no longer necessary comparisonsJulian Andres Klode2024-06-131-22/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Comparing the size of work items is not strictly needed; we check if items have a single or no solution and propagate them early on, but it doesn't matter much if we solve A|B or C|D|E first. This will allow us to get rid of all the resizing business later on, and switch to using literal watching where we only watch one of the literals on the right hand side. Likewise, the upgrade case mattered initially in testing, but seems to have resolved itself.
| * | solver3: Group work itemsJulian Andres Klode2024-06-132-27/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our backtracking is chronological, so we will first try alternative choices or skip optional items in later groups. So installing manually installed packages before automatically installed ones allows manually installed packages to remove automatically installed packages easily. If we did automatic packages first, we'd keep back upgrades for manual packages or change choices for their dependencies, or would have to backtrack harder to get back to the right decision level. That's silly. Ordering automatically installed packages last also allows us to calculate autoremovable packages. Since we will have installed all dependencies from manually installed packages by the point where we get to automatically installed packages, everything that will be installed in those Auto groups is inherently garbage.
| * | solver3: Do not dump sizes that are clearly pointersJulian Andres Klode2024-06-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | We use a union here, but we don't know if we last stored a pointer, so let's just reject clearly non-sizes. Generally this will work fine -- you will not have enough choices in a dependency that you can construct a valid pointer to a Version*, especially given that any Version * > sizeof(pkgCache::Header) already, given it is in the cache.
| * | Make the failure mode for non-executable tests strongerJulian Andres Klode2024-06-131-1/+1
|/ / | | | | | | | | | | | | | | | | When a test-* file is created but not executable, we'd ignore the argument and then our subprocess would run the entire test suite itself, sequentially. Silly. Let's just see if the file exists instead, then the test will fail.
* | Merge branch 'gpgv-options' into 'main'Julian Andres Klode2024-06-131-12/+2
|\ \ | | | | | | | | | | | | Check gpgv --dump-options for --assert-pubkey-algo support See merge request apt-team/apt!355
| * | Check gpgv --dump-options for --assert-pubkey-algo supportJulian Andres Klode2024-06-131-12/+2
|/ / | | | | | | | | | | | | This avoids the fragile --help check. This option is not documented in the manual page but seems to be there. Thanks: Justus Winter for the idea
* | Dutch manpages translation updateFrans Spiesschaert2024-06-111-48/+36
| | | | | | | | Closes: #1072494
* | Dutch program translation updateFrans Spiesschaert2024-06-111-8/+10
|/ | | | Closes: #1072493
* Merge branch 'user-ci-fixes' into 'main'Julian Andres Klode2024-05-283-6/+8
|\ | | | | | | | | CI: Set /bin/sh shell for travis user, so flock -c works See merge request apt-team/apt!351
| * Fix test cases for non-amd64 architecturesJulian Andres Klode2024-05-282-5/+7
| | | | | | | | | | | | These got broken by the recent solver3 changes by accident, and we did not notice as I also broke the test suite detection with the new statistics feature, hooray.
| * CI: Set /bin/sh shell for travis user, so flock -c worksJulian Andres Klode2024-05-271-1/+1
|/ | | | This is awkward.
* Release 2.9.42.9.4Julian Andres Klode2024-05-2548-226/+514
|
* Merge branch 'solver3' into 'main'Julian Andres Klode2024-05-2558-112/+751
|\ | | | | | | | | solver3: Run the test suite, at least the passing tests + some fixes. See merge request apt-team/apt!349
| * solver3: Fix translations of removals for marked installJulian Andres Klode2024-05-243-2/+2
| | | | | | | | | | | | | | | | | | We also need to issue a MarkDelete() if the package is marked for installation currently but should not be, not only if it did not have a previous version. This fixes the final test in test-multiarch-barbarian, the others only needed adjustments to mark all packages as automatic.
| * solver3: Actually restore unsolved items rather than solved onesJulian Andres Klode2024-05-243-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When restoring previously solved items, we try to restore items that have become unsolved again by skipping items that have a solved solution. Well at least we thought we did, but we accidentally had a "not" in there that inverted the meaning, hence we lost work items on backtracking. This mostly did not seem to have caused any issues, I stumbled over it while trying to add `autoremove` listings to `upgrade`, but fixing it also fixes: test-ubuntu-bug-1130419-prefer-installed-ma-same-siblings This used to say "E: Broken packages", meaning the solver lost a non-optional install request and the 2nd stage solver caught an incomplete solution. Also test-bug-735967-lib32-to-i386-unavailable restores the legacy solver behavior, so win win?
| * solver3: Use stable sortJulian Andres Klode2024-05-241-5/+5
| | | | | | | | | | | | | | | | | | | | While it seems that libstdc++ is using stable_sort for sort, we should make this explicit: We don't want items in our queues to move ahead of earlier items of the same priority. i.e. consider dependencies, they are grouped by package, we don't want the sort algorithm to move B=2 ahead if A|B (which expands to A=2|A=1|B=2|B=1).
| * solver3: Solve optional dependencies before optional packagesJulian Andres Klode2024-05-243-1/+3
| | | | | | | | | | | | | | This somewhat improves reliability of not breaking Recommends, e.g. if the Recommends gets tightened. One test case enabled by this now is the test-resolver-provider-exchange, which with a simple change to allow removal of automatically installed packages works now.
| * solver3: Promote satisfied Suggests to RecommendsJulian Andres Klode2024-05-243-23/+48
| | | | | | | | | | | | As per the test-suggests-promoted-to-recommends test. This is still a bit messy as we ignore alternative choices and only check the last one, but um seems useful?
| * test-bug-758153-versioned-provides-support: Solver 3.0 supportJulian Andres Klode2024-05-242-2/+9
| | | | | | | | | | The previous commit basically fixes this, it just requires some minor small adjustments
| * solver3: Try candidate before installed version on upgradeJulian Andres Klode2024-05-242-2/+60
| | | | | | | | | | | | | | | | | | | | This fixes --no-strict-pinning attempting to upgrade all the versions on the system. Adjust the upgrade test case accordingly: 1) no-strict-pinning pulls in systemd despite it being pinned down due to a dependenc (this was true before this fix) 2) no-strict-pinning does not pull in the upgrade-simple because nothing depends on it (this is what the test fixes)
| * test: Support the 3.0 solver in most existing test casesJulian Andres Klode2024-05-2448-115/+492
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Highlights: - test-bug-618848-always-respect-user-requests: (Do not) Support 3.0 solver A manually installed package is never removed just because we request the removal of its dependency in solver3. - test-bug-657695-resolver-breaks-on-virtuals: Support 3.0 solver For manually installed packages, solver 3.0 would require some new xserver-xorg-video-driver to Conflict+Replace+Provides the old one (once the logic is implemented), but that does seem reasonable. - test-bug-720597-build-dep-purge: Support 3.0 solver This needs a simple aptmark auto because pkga is removed by the build-dep. But further adjustments are necessary because it weirdly tested for no autoremovable packages before installing pkgc. - test-bug-960705-*: Support 3.0 solver Bit awkward to deal with; notably the protect to conflict doesn't actually work anymore and that is a feature these days.
| * test: Show statistics for parallel tests tooJulian Andres Klode2024-05-241-1/+26
| | | | | | | | | | | | | | | | This makes things a bit nicer. We also include a list of passed tests here, to use with --only to validate solver3 changes, as well as the list of skipped tests. But too lazy to implement these for the non-parallel case.
| * test: Temporarily ignore autoremovable lists for solver3Julian Andres Klode2024-05-242-2/+11
| | | | | | | | | | We do not show them yet, so let's ignore them so we can focus on getting the rest of the tests to work.
| * test: Run working tests against the 3.0 solverJulian Andres Klode2024-05-244-4/+130
| | | | | | | | | | Implement --solver, --only, -skip flags for the test suite, and run the test suite with the broken tests skipped against solver3.
| * solver3: Implement APT::Solver::RemoveManual to allow removing manual packagesJulian Andres Klode2024-05-243-2/+9
| | | | | | | | | | | | This is mostly going to be useful for the test suite for now, implement a function there to set it up so we can use it to improve test suite correctness.
| * edsp: solver3: Show some progressJulian Andres Klode2024-05-242-7/+17
|/ | | | | Ignore the Solving dependencies... line in the testing framework for compatibility with the existing test cases.
* pkgcachegen: Do not try to chmod or write to /dev/nullJulian Andres Klode2024-05-221-0/+4
| | | | | | | When -o Dir::Cache::pkgcache or -o Dir::Cache is set to /dev/null we accidentally changed its mode to 0666; which is certainly not intended. Avoid this issue by exiting the function early if the file specified is /dev/null.
* Deal better with spurious spaces in arch restrictionsDavid Kalnischkies2024-05-162-44/+93
| | | | | | | | Another instance of our parser written for sane clean input, but nowadays used also for user-provided input which can contain very many strange formatting and especially white spaces all over the place. Closes: #1071219
* Do not save new if we have already installed providersDavid Kalnischkies2024-05-162-9/+20
| | | | | | | | | | | | | | | | | | | | | | | | Companion of the previous commit that uses the same reasoning, but from the other side of the logic (as we start from reverse deps here) so that we are dropping the useless NEW from the solution. Ideally this code would not live in -private, but in -pkg, but there is not really a pre-existent good central place for this currently as a sort-of fixup for our default resolver given this is the result of resolver decision to not do something which had ripple effects that aren't reverted along with it. It is a bit unlikely that this is fixing all instances that this bug has given we have dealt with a few instances of it already as they are relatively obscure situations to clean up after and the cost of being wrong (= autoremover generating breaks) is much higher than being correct (= no pointless install – that is likely installed later anyhow after the temporary automatic hold is lifted). And by virtue of being the result of mostly temporary situations its also unlikely to be debugable in hindsight months later; so if there is another situation, its better to deal with it in a new bugreport. Closes: #839546
* Do not mark new if we have already installed providersDavid Kalnischkies2024-05-162-3/+33
| | | | | | | | | | | The test is actually documenting another bug hidden a bit by this one as we do not need to install a NEW package in this situation as the upgrade needing it was kept back, but it was protected from considering it to be autoremoveable as all providers tend to be considered protected, but by limiting us to installed providers if we have some we can drag those new packages out of hiding. Now, we "just" have to get right of the NEW package in a next step.
* Fix accidental silencing of output differences in testsDavid Kalnischkies2024-05-162-13/+39
| | | | | | | | | | Removing every line with at least three characters at the end makes comparisons for output differences rather easy to pass. The intend was to match for '\.\.\.' but given we have to adapt the strings to include autoremove remarks we can also include the string that appeared now that state information is provided (in the form of autobits). Regession-Of: 734eb9ac3f65e38ac3ba7f2d50ea206743a6f611
* Release 2.9.32.9.3Julian Andres Klode2024-05-145-6/+58
|
* Merge branch 'solver3' into 'main'Julian Andres Klode2024-05-1411-3/+1288
|\ | | | | | | | | Initial implementation of the 3.0 solver See merge request apt-team/apt!347
| * EDSP: Add "solver3" alias for apt-internal-solverJulian Andres Klode2024-05-142-1/+5
| | | | | | | | | | This invokes the 3.0 solver. It has a nicer name for a binary, matching the communicated codename.
| * test-allow-scores-for-all-dependency-types: Adjust for solver3Julian Andres Klode2024-05-141-0/+3
| | | | | | | | | | | | It relies on removing packages, so we must allow it to. To see if it does the right thing, mark all packages automatically installed.
| * test: Ignore progress output in comparing output..Julian Andres Klode2024-05-141-0/+1
| |
| * Initial implementation of the 3.0 solverJulian Andres Klode2024-05-147-2/+1279
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a simple backtracking brute-force solver with heurisitcs, this initial version has the following known gaps: - Errors are not kept from branches, the error reporting after backtracking isn't particularly useful. - We cannot show automatically removed packages - We cannot replace packages with others - We do not have conflict-driven clause learning yet Untested: - Multi-arch This solver is fundamentally different in key aspects: - It solves smaller dependency groups before larger ones, leading us to avoid installing A in A|B if B is installed more often and more consistently. - It only keeps the automatic packages reachable via the strongest path. Currently it only implements autoremoval, but not display of autoremoval as we simply enqueue all automatically installed packages at the end when not doing automatic removal. This will need some translation where we Solve() first, and then Solve() again with the automatically installed packages added such that we can mark them as Garbage for display purposes. - It does not remove manually installed packages. Hook the solver in via the EDSP framework, this allows us to achieve easy initial integration without lots of issues. A lot of this work was planned and executed in my free time and then some leaked into work time I suppose. Implementation notes: - Restore the full backlog of items The annoying thing is that we record only when an item was enqueued and not the level at which it was installed, so when going back a decision level we might have to reinstall packages that were queued at an earlier decision level because they were only installed at a later decision level. - When picking one version, reject the others - Propagate conflicts up to reverse dependencies This will recursively mark every reverse dependency that can no longer be satisfied as MUSTNOT. Also make sure to recursively call Reject(Ver) from Reject(Pkg) to make sure we trigger the Rejections there. This means we now end up having Recursion in the algorithm. An alternative approach would be to push *reject* items to the heap and then do them, but this is not entirely straight forward and it may simply not be necessary. - Sort upgrades before other optional installs containing subsets If I want to upgrade a package A, I schedule A3|A2|A1; if another thing depends specifically on A1; we'd not be installed. Hence we need to sort upgrades first. This only is needed for optional packages; manual packages will figure this out naturally. - Rescoring is lazily implemented. Instead of calling make_heap() after rescoring items, we just mark the items as dirty and reinsert them. We also only rescore from the main solve loop, Reject() marks the heap as needing a rescore due to a Conflict (as some versions will no longer be installable), and RescoreWorkIfNeeded() then will do the rescoring. - Recursive unit propagation: Install() and Reject() recursively call each other to promote decisions across single-version dependencies (or across not-anymore satisfiable reverse-depends). - Make Reason constructors explicit, this enhances readability This makes calls like the one in here be Reject(object, Reason(otherObject)) Ensuring that it's clear that the 2nd argument is a reason at the caller side. - Split Decision into Decision and Hint vs. first draft When branching/deciding, we do not want to override SHOULD and MAY. We do not actually use them yet, and we do actually clean them when backtracking, but let's at least keep the data structure correct. Convert the enum to a 16-bit integer so we can still fit in the same space as before.
* Dutch manpages translation updateFrans Spiesschaert2024-05-061-28/+21
| | | | Closes: #1070143
* Dutch program translation updateFrans Spiesschaert2024-05-061-64/+39
| | | | Closes: #1070142
* Separate columns by 2 spaces in listsJulian Andres Klode2024-04-301-1/+1
| | | | | | | This improves readability a bit more as it's visually easier to tell " " and "-" apart than " " and "-". Closes: #1070064
* Merge branch 'src-specifier' into 'main'Julian Andres Klode2024-04-294-4/+138
|\ | | | | | | | | showsrc, source, build-dep: Support src:name See merge request apt-team/apt!346
| * source, build-dep: Allow specifying src:nameJulian Andres Klode2024-04-292-1/+121
| | | | | | | | This has the same behavior as --only-source name.
| * showsrc: Support querying src:nameJulian Andres Klode2024-04-292-3/+17
| | | | | | | | This has the same meaning as --only-source name