summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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
* | Allow parsing an empty Provides lineDavid Kalnischkies2024-04-263-3/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | If dpkg-gencontrol was involved in the creation of a package we will not usually encounter empty or otherwise useless fields, but apparently not everyone is using it. It isn't recommended to have these empty lines, but it isn't too hard to ignore for Provides as we did for dependencies already and apt-ftparchive can be convinced to produce empty files (if you feed it such a package) as well, so lets be nice and provide users with a more accepting parser. Closes: #1069874
* | Merge branch 'fix/mixed' into 'main'Julian Andres Klode2024-04-2616-87/+208
|\ \ | |/ |/| | | | | Split out of mostly independent fixes: cmake execute errors, removed rev-deps, protected garbage & co See merge request apt-team/apt!345
| * Add test for dealing with unsat Suggests promoted to RecommendsDavid Kalnischkies2024-04-241-0/+65
| | | | | | | | | | Our code does the right thing currently, so lets add a test to ensure this keeps being the case in the future.
| * Drop sudo-related envvars in testing frameworkDavid Kalnischkies2024-04-248-56/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | Our autoremoval-advertisment is modified by SUDO_USER as if the current apt call was made with sudo it seems a good idea to show the ad with sudo as well. That is annoying for our tests through as normally the tests are run locally or by autopkgtest without sudo, but in Gitlab CI we use it (to run our tests as user… as we are already root) and so individual tests had to deal with this. That is annoying and really not needed as we can have our autoremove test check that this ad gets displayed the right way and ignore it the rest of the time.
| * Do not upgrade rev-deps ear-marked for removalDavid Kalnischkies2024-04-242-2/+55
| | | | | | | | | | | | | | | | | | | | | | | | We schedule reverse dependencies for an upgrade, but we shouldn't do it if we have ear-marked this package for removal later on. Usually the solver will end up doing the right thing like it already did in the included testcase in the end, but given that before it reaches the right end it explored a bad path which can lead to more installs and removals influencing later decisions or are just too hard for the resolver to undo later on, we can just not explore this path to begin with. References: e077370ffcb3669a50a600e80356c2002e6b176d
| * Match version constraints before saving garbage packagesDavid Kalnischkies2024-04-242-10/+31
| | | | | | | | | | | | | | | | | | We remove new garbage packages from the solution if we can as installing a new package which is at the same time considered garbage looks silly, but it could also be a new dependency of another garbage package, so we have a second round trying to save such packages. In this round we weren't considering versioned constraints on dependency relations through so even an unsatisfied old recommends could save which it shouldn't.
| * Avoid figuring which kept pkgs are phased if we don't display itDavid Kalnischkies2024-04-241-10/+10
| | | | | | | | | | | | | | Not all commands show kept back packages, so even if it hardly matters, lets not crunch numbers needlessly if we don't need the info which also reduces the lifetime of the involved variables hopefully also reducing the mental requirements for a reader.
| * Do not ignore if a cmake execute_process failsDavid Kalnischkies2024-04-244-9/+18
|/ | | | | | Ignoring errors might lead to failures later on anyhow, but especially with triehash it could also lead to broken builds or other crazy stuff, so lets better be save than sorry.
* The text of notices and audits shall not be boldJulian Andres Klode2024-04-231-2/+4
| | | | | This turned out to be a bit too bold for most of them, given their informational nature.
* Highlight essential removals with action::remove colorJulian Andres Klode2024-04-231-1/+1
|
* Release 2.9.22.9.2Julian Andres Klode2024-04-2258-404/+2926
|
* Add long-version message "Audit:" instead of "A:"Julian Andres Klode2024-04-221-1/+1
|
* Merge branch 'ui-2.9.2' into 'main'Julian Andres Klode2024-04-2210-34/+83
|\ | | | | | | | | UI changes for 2.9.2 See merge request apt-team/apt!343
| * Show "Upgrading:" before other sectionsJulian Andres Klode2024-04-191-2/+2
| | | | | | | | | | | | This avoids awkward interactions with Installing dependencies and Suggested packages appearing before it; despite being triggered by it.
| * Insert blank line following simulation noteJulian Andres Klode2024-04-191-0/+2
| |
| * Remove spurious newline inside `apt autoremove` messageJulian Andres Klode2024-04-192-11/+17
| | | | | | | | | | | | Add a new `note` field to `ShowList` which contains a line to be displayed after the list itself. This allows `ShowList` to render a self-contained list block.
| * show: Highlight field names and colorize package nameJulian Andres Klode2024-04-195-14/+40
| | | | | | | | We should pass this properly to the TagSection.write()
| * apt update: Show upgradable package count in boldJulian Andres Klode2024-04-193-1/+7
| |
| * i18n: Use Error:/Warning:/Notice: instead of E:/W:/N:Julian Andres Klode2024-04-191-5/+10
| | | | | | | | | | This allows these bits to be localized, improving user experience for users in different languages.
| * Keep the entire error/warning/notice message boldJulian Andres Klode2024-04-191-0/+4
| | | | | | | | | | This draws a bit more attention, and improves readability vs keeping the color for the entire message.
| * Render notices without (yellow) color, just in boldJulian Andres Klode2024-04-191-1/+1
| | | | | | | | Yellow is a bit odd for notices.
* | build: test: Silence warnings in GTest codeJulian Andres Klode2024-04-2033-32/+43
| | | | | | | | | | GTest has a lot of broken things with signed vs unsigned, and double integer promotions, let's silence them.
* | test: configuration: color: reset _config after testsJulian Andres Klode2024-04-201-0/+2
| | | | | | | | | | | | This avoids us polluting the configuration for later tests, since the test order apparently is not deterministic. We probably should fix some common test case thingy instead.
* | Merge branch 'audit' into 'main'Julian Andres Klode2024-04-199-8/+53
|\ \ | |/ |/| | | | | Add an "audit" error level See merge request apt-team/apt!323
| * Add an audit message for missing InRelease filesJulian Andres Klode2024-04-191-0/+2
| |
| * Add an --audit option to switch on audit loggingJulian Andres Klode2024-04-194-2/+15
| | | | | | | | | | This option is recommended to be used by repository operators for testing.
| * Change the default log level from debug to noticeJulian Andres Klode2024-04-195-6/+6
| | | | | | | | | | | | | | | | | | | | We never used the debug level before, so we can do that. This allows us to have the new audit level. We did call DumpErrors() with DEBUG in two debug code paths, so don't touch those. debug
| * Add an "audit" error levelJulian Andres Klode2024-04-192-0/+30
|/ | | | | This will aggressively highlight out-of-compliance vs the best practices.
* Merge branch 'color-framework' into 'main'Julian Andres Klode2024-04-1911-20/+144
|\ | | | | | | | | Introduce APT::Configuration::Color, --color option and documentation for color. See merge request apt-team/apt!342
| * apt.conf(5): Document the APT::Color scopeJulian Andres Klode2024-04-191-0/+39
| |
| * private-output: Remove check for output version for colorJulian Andres Klode2024-04-191-2/+2
| | | | | | | | This is somewhat pointless.
| * Add a --color, --no-color optionJulian Andres Klode2024-04-193-5/+14
| | | | | | | | Wrap empty else in {} to avoid readability issues
| * Configure individual action colors using APT::Color::ActionJulian Andres Klode2024-04-192-7/+13
| |
| * Use APT::Configuration::color to apply color to outputJulian Andres Klode2024-04-194-15/+18
| |
| * Add APT::Configuration::color helper to colorize thingsJulian Andres Klode2024-04-193-0/+67
|/
* Allow no spaces for the last dependency in ParseDepends, tooDavid Kalnischkies2024-04-172-1/+34
| | | | | | | | | | | | | | | | | | | | All other entries in a dependency line get substantial leeway about the amount of spaces surrounding the entry itself and its individual parts, but the very last entry was required to have a version constraint be at least 4 chars long (excluding opening bracket and spaces following it), so if the version is short and a single-char relation used a space had to make up for it. This is a bit unfair in comparison to the other entries who do not have such unreasonable demands, so we reduce our demand to 3 chars or longer, which is satisfied by "=1)". If it is a good idea to hate spaces that much remains unanswered by this commit, but in practice most tools (re)writing the files we parse will include spaces, so its only in files (or on the satisfy command line) directly edited by users that we can encounter such a situation, which is a relatively new development given this line came unchanged from the introduction of this method in 1998. LP: #2061834
* Simplified Chinese program translation updateBoyuan Yang2024-04-171-73/+54
| | | | Closes: #1069118
* Czech program translation updateMiroslav Kure2024-04-171-65/+43
| | | | | | | Note by committer: Merged with latest pot and resolving 3 white space fuzzies introduced by it Closes: #1068943