summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Release 2.9.302.9.30Julian Andres Klode2025-02-1648-92/+346
|
* Update symbols from experimentalJulian Andres Klode2025-02-161-0/+2
| | | | | Some manual editing, as riscv64 and mips64el are not yet built in exp2
* Release 2.9.29+exp2Julian Andres Klode2025-02-151-0/+13
|
* Add more excludes to the versionscriptJulian Andres Klode2025-02-152-2/+6
|
* Add missing #include <string_view>Julian Andres Klode2025-02-1512-0/+12
|
* Add missing #include <memory>Julian Andres Klode2025-02-154-0/+4
|
* cache: Introduce partial SourceVersion supportJulian Andres Klode2025-02-158-29/+99
| | | | | | | | | | | | This is the first step that introduces a 1:1 mapping between version and source version. In a future version this can use the fields currently marked unavailable to deduplicate the SourceVersion objects across the group. The policy gains a member for storing pins for sourceversions. Together, in the future we should be able to determine candidates for source versions.
* cacheset: Drop APT_PUBLIC from templatesJulian Andres Klode2025-02-152-17/+2
| | | | | These templates are all inline and there is not much sense exposing their vtables and typeinfo publicly.
* fileutl: Convert FileFd::d to std::unique_ptrJulian Andres Klode2025-02-152-18/+14
|
* Remove some more unused functionsJulian Andres Klode2025-02-155-78/+0
| | | | Final ABI cleanup before unstable?!
* Run unifdef -DAPT_PKG_ABI=700 againJulian Andres Klode2025-02-158-77/+0
| | | | | main picked up a couple new ifdefs since the branch started; so clean them up again.
* Release 2.9.29+exp1Julian Andres Klode2025-02-141-0/+11
|
* Symbols?наб2025-02-141-20/+20
|
* StartsWithGPGClearTextSignature(): don't keep un-written-to pointer to ↵наб2025-02-141-1/+1
| | | | constant string in .data
* flAbsPath(): try to re-use storage of argumentнаб2025-02-141-2/+2
|
* Take const& in flNotFile()наб2025-02-142-2/+2
|
* Take const& in GetLock()наб2025-02-142-2/+2
|
* Take const& in Rename()наб2025-02-142-2/+2
|
* Take const& in {,Real}FileExists()наб2025-02-142-4/+4
|
* string{=> _view} flNotDir(string{=> _view}). Configuration::{Cnd,}Set(Value: ↵наб2025-02-1419-47/+51
| | | | string{=> _view})
* Return string_view from Apt::String::Strip(). Take string_view in ↵наб2025-02-146-23/+23
| | | | VectorizeString(), StringSplit(), SubstVar()
* APT::String::* should take string_viewsнаб2025-02-142-26/+13
|
* string{=> _view} flExtension(string{=> _view})наб2025-02-146-12/+12
|
* Drop APT::StringViewнаб2025-02-147-301/+2
|
* APT::StringView -> std::string_view [textonly]наб2025-02-1411-115/+111
|
* apt-pkg: Avoid exporting any optional symbolsJulian Andres Klode2025-02-144-279/+18
|
* Bump symbolsJulian Andres Klode2025-02-142-1612/+1612
|
* Bump ABI to 7.0Julian Andres Klode2025-02-145-7/+5
|
* BaseRegexMatcher: Use std::optional [ABI]Julian Andres Klode2025-02-142-11/+11
|
* algorithms: Use smart pointer for 2nd PListJulian Andres Klode2025-02-141-13/+8
| | | | | | This involves the use of goto to fix undefined behavior in the for-loop restart which temporarily generates a K pointing one element ahead of the start of the array (which is undefined).
* algorithms: Use &list[0] instead of list.get()Julian Andres Klode2025-02-141-6/+6
| | | | This makes it clear from reading that we are accessing an array.
* algorithms: Use smart pointersJulian Andres Klode2025-02-142-21/+13
|
* pkgrecords: Use smart pointerJulian Andres Klode2025-02-142-11/+4
|
* packagemanager: Use smart pointersJulian Andres Klode2025-02-142-15/+9
|
* tagfile: Use smart pointersJulian Andres Klode2025-02-142-46/+47
| | | | | Some bit of private refactoring to avoid having to pass the raw pointer.
* policy: Use smart pointersJulian Andres Klode2025-02-142-13/+8
|
* Release 2.9.292.9.29Julian Andres Klode2025-02-145-6/+42
|
* Merge branch 'solver3' into 'main'Julian Andres Klode2025-02-1451-428/+500
|\ | | | | | | | | Get 3.0 solver mostly in shape See merge request apt-team/apt!451
| * solver3: Store clauses as the reasons for decisionsJulian Andres Klode2025-02-142-23/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far we only stored the last reason why something was decided, for example, if "A depends B | C" and we assigned B=false, C=false, we'd store "(not) C" as the reason for "(not) A". This gives us only a partial implication graph; after all "C" was not the *sole* reason for not installing A. This has two implications: 1. We cannot do conflict-driven clause learning 2. We cannot print excellent information about why packages cannot be installed (or removed) This commit is incomplete in addressing both; in particular, we always store a clause as a reason for something that is not a root object; whereas MiniSAT would only store a clause on propagation. That is, if A depends B | C, and we install A, then we have to make a choice between B|C. Let's say we pick B, we store 'A depends B|C' as the reason whereas MiniSAT would not store a reason (because it picked the "next best" unassigned literal). Hopefully this is not going to be an issue. The reason is used to calculate the assignments that caused the decision in MiniSAT, but the idea is that we can just treat reason clauses with unassigned values as "no reason". The conflict explanation (WhyStr) has been changed to print the strongest reason; which produces the same result as the previous solution for the test suite. What does this mean? If we look at A depends B|C, let's analyse: Why not A? We return the first assigned value for B|C, likely B. We might have returned C here before as it was the last assignment, but we might also return C here, if B is not assigned. Why B? We return A. If we look at A conflicts B: Why not A? Well B Why not B? Well A Thanks to the structure of the implication graph this is quite simple, but also generalizing this to the CNF format should not be hard. A future version will extend clauses with backlinks to pkgCache::Dependency*, allowing us to print useful information to uses such as "A Depends B | C | D (>= 2)" in the real form, rather than the expanded form which may be "A -> B | C | D=3 | D=2".
| * solver3: Only enqueue shared dependencies at the package levelJulian Andres Klode2025-02-1422-65/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dependencies shared by all versions are enqueued at the package level, so avoid enqueuing duplicates at the version level. This presumably has no meaningful impact on performance, potentially a negative performance impact on some workloads as we now need to find the duplicates again; it can become useful when there is a lot of backtracking. More importantly though this improves error messages, because now we can say that "all versions of foo depend on X", rather than saying "foo=1 depends on X" and you are left wondering why we did not select "foo=2". In this commit though, improved error messages are not implemented, they depend on redesigning the reason tracking to use clauses. Also the rationale tracking includes a lot more dependencies of the form "pkg:arch=version -> pkg:arch" which are annoying. Improved error messages should fold them into one node.
| * solver3: Remove work rescoring in favor of unit propagationJulian Andres Klode2025-02-146-64/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | Instead of expensive rescoring of all outstanding items, use unit propagation to find new units after conflicts. We still count the items when adding them; but unless they are 0 or 1, which they should not be, they don't have any effect: The size field is now effectively static. If the size of an optional clause changed to 1, it is inserted a second time, and then moves up to the top of the optional items per the Work::operator< rules.
| * solver3: Refactor a debug messageJulian Andres Klode2025-02-141-6/+1
| | | | | | | | | | Use Var::toString() to print the variable, instead of duplicating the code :D
| * test: Remove long obsolete FIXME for solver3Julian Andres Klode2025-02-141-2/+1
| |
| * test: Annotate the broken test casesJulian Andres Klode2025-02-141-4/+4
| |
| * test-ubuntu-bug-614993: Avoid implicit upgrade-by-source requirementJulian Andres Klode2025-02-142-11/+8
| | | | | | | | | | | | | | This allows it to work with solver3 before that feature is implemented. This essentially reverts the change to that test made in 119a8d0ed19a4e946591b9aef7d662e14ca7ece5
| * ResolveByKeep: Do not pass UPGRADE_ALL to EDSP solverJulian Andres Klode2025-02-142-2/+1
| | | | | | | | | | | | | | | | | | | | When we call an EDSP solver from ResolveByKeep(), we are not in an upgrade context: In an upgrade context, we call the solver directly from upgrade.cc instead of doing any Resolve() or ResolveByKeep() calls. This fixes the test-bug-602412-dequote-redirect test case, where ResolveByKeep() was called as part of --fix-missing
| * solver3: Pass EDSP flags directly rather than via configJulian Andres Klode2025-02-144-13/+11
| | | | | | | | | | | | | | This was a rather silly way to communicate state, and it was in the wrong place. Notably also, multiple calls to the solver had the options sticky, that is, if you run upgrade and then it calls ResolveByKeep(), for example.
| * test-dont-forget-conflicts-via-unknown-architectures: Use install, not upgradeJulian Andres Klode2025-02-142-2/+2
| | | | | | | | | | The 3.0 solver does not support upgrade arguments to override the policy.
| * Fix test-phased-updates-upgradeJulian Andres Klode2025-02-142-3/+2
| | | | | | | | | | | | | | Our upgrade policy does not support specifying packagenames to upgrade commands that are not subject to the policy. It's possible this can be addressed at a later time, but let's not block the rest of the test from running.
| * solver3: Fix ordering of or groupsJulian Andres Klode2025-02-143-16/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We inadvertently performed a global ordering of all possible solutions for the or group using CompareProviders3. This however is not correct, as we lose the ordering of the dependency group *too* much. Mostly this has no effect, but you can see for example in test-explore-or-groups-in-markinstall various instances of it. Adjust said test case to work with the 3.0 solver to the extent possible under the current design. The 3.0 solver does Recommends after processing any manually installed packages; as such the various Recommends test cases do not work: A `Recommends: okay|upgrade` will not upgrade `upgrade` if it visited `upgrade` first. This may change at a future time, but the correct semantics for Recommends are not entirely clear. Notably, the existing solver is not always consistent. You can see here where they matter, but recently I added test-solver-recommends-depends in which the Recommends do not influence the choice of other Depends.