summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * Update Simplified Chinese translationTianyu Chen2025-08-261-19/+12
|/
* German program translation updateHelge Kreutzmann2025-08-261-3/+3
| | | | Closes: #1111875
* solver3: Allow any downloadable version to mark a package as not obsoleteJulian Andres Klode2025-08-262-6/+21
| | | | | | | | | | | | Lots of people have pinned an older version that is no longer installable, or more common yesterday, we saw a lot of people who seemingly manually installed a newer version of a deb than in the repositories, causing the package to be considered obsolete, which does not make much sense. Oops: 4c39d922-410f-11f0-bbf9-fa163ec44ecd Oops: a64054f6-4140-11f0-bbfd-fa163ec44ecd Oops: a32196c1-661d-11f0-a97c-fa163ec8ca8c
* solver3: Sort dependency targets against current alternativeJulian Andres Klode2025-08-263-14/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of inadvertently sorting dependency targets against the first alternative in an or group, sort them against the current alternative as we should. Otherwise we ended up sorting gnome-shell | notification-daemon With Package: notification-daemon Package: awesome Provides: notification-daemon into gnome-shell | awesome | notification-daemon <-we sorted this part wrongly-> This fixes a minor difference in test-release-candidate-switching in one case, but not the other where the difference was actually caused by the loss of install argument ordering information in the new solver, so just flip the arguments so both solvers produce the same outcome.
* Portuguese manpages translation updateAmérico Monteiro2025-08-261-34/+44
| | | | Closes: #1111124
* doc: Remove <filename> inside <arg>Julian Andres Klode2025-08-261-1/+1
| | | | | xmllint 2.14 reports that filename cannot be used inside of arg, breaking the CI. Remove the filename element.
* Merge branch 'apt/why/not' into 'main'Julian Andres Klode2025-08-161-3/+3
|\ | | | | | | | | completion: apt why/why-not See merge request apt-team/apt!505
| * completion: apt why/why-notChristopher Bock2025-08-161-3/+3
|/
* Release 3.1.43.1.4Julian Andres Klode2025-08-116-7/+28
|
* Release 3.1.33.1.3Julian Andres Klode2025-06-245-6/+31
|
* Merge branch '3.0.2-translations' into 'main'Julian Andres Klode2025-06-246-526/+353
|\ | | | | | | | | Cherry pick translations for 3.0.2 (to be shipped in 3.0.3) into main See merge request apt-team/apt!501
| * Czech program translation updateMiroslav Kure2025-06-241-18/+12
| | | | | | | | | | | | | | Minor edit to backport the translation (s/apt/apt-get/ in the update message). Closes: #1106155
| * German translation updateJulian Andres Klode2025-06-241-10/+10
| | | | | | | | | | | | | | Align the grammar in a way that respects the vision of the short user experience. Closes: #1106116
| * Dutch manpages translation updateFrans Spiesschaert2025-06-241-37/+19
| | | | | | | | Closes: #1104313
| * Dutch program translation updateFrans Spiesschaert2025-06-241-28/+18
| | | | | | | | Closes: #1104312
| * French manpages translation updatebubub2025-06-241-321/+223
| | | | | | | | Closes: #1103760
| * Portuguese manpages translation updateAmérico Monteiro2025-06-241-112/+71
|/ | | | Closes: #1103640
* Merge branch 'tls-closed-assertion' into 'main'Julian Andres Klode2025-06-241-2/+1
|\ | | | | | | | | tls: Do not trigger assertion after closing connection See merge request apt-team/apt!496
| * tls: Do not trigger assertion after closing connectionJulian Andres Klode2025-06-241-2/+1
|/ | | | | | | | | | | In HasPending(), we assert that there is an open connection object (ssl), but it seems we can end up calling HasPending() after calling Close(). Therefore, remove the assertion and include ssl != nullptr as the first requirement. Closes: #1107827
* Merge branch 'lp2003851' into 'main'Julian Andres Klode2025-06-242-3/+32
|\ | | | | | | | | Fix stuck acquire queues on partial server errors See merge request apt-team/apt!500
| * Fix stuck acquire queues on partial server errorsJulian Andres Klode2025-06-242-3/+32
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a server responds with two InRelease files, but one is good, and the other indicates a temporary error, we queued the other indices from the good repository for downloading and then queued the retry. The resulting queue ended up with items having fetchAfter=0 before the item with fetchAfter=<something>, causing the Run() loop to not detect a stuck queue. Change the order of the queue such that the highest retry-after items comes first; this ensures that we always see stuck queues. This of course changes the behavior of retries in that if one file fails temporarily we block the entire server. This does seem more beneficial in the common case - if one file fails, probably all of them fail, and there's no point bombarding the server with requests for indices from good repositories until all have failed. The actual root cause is more that the remaining items are Enqueued like this: 1. Enqueue jammy/InRelease (delayed) 2. Enqueue jammy-updates/main all Packages The resulting queue ended up being: jammy-updates/main all Packages jammy/InRelease (delayed) But Enqueue() only calls Cycle() when there are no items in the queue already - after all, any item that is already running will call Cycle() eventually. Or so was the case until we added the retry-after handling. It's unclear why we don't Cycle() all the time when enqueuing a new item, given that our pipeline might not be filled yet, and we could send the request to the server while waiting for data on a running item. Trying to always Cycle() however led to regressions that still need investigating. Given that, this solution certainly is the more easy to reason about one. LP: #2003851
* Merge branch 'include-std-headers' into 'main'Julian Andres Klode2025-06-184-0/+4
|\ | | | | | | | | Include standard headers to fix clang compiler error See merge request apt-team/apt!497
| * Include standard headers to fix clang compiler errorBiswapriyo Nath2025-06-184-0/+4
|/ | | | | | | | This commit fixes the following compiler errors. apt-pkg/acquire.cc:833:51: error: no template named 'function' in namespace 'std' apt-pkg/contrib/error.cc:198:59: error: no member named 'front_inserter' in namespace 'std' apt-pkg/solver3.h:44:22: error: no template named 'is_trivially_constructible_v' in namespace 'std' methods/http.cc:1029:24: error: no member named 'inserter' in namespace 'std'
* Release 3.1.23.1.2Julian Andres Klode2025-06-103-2/+8
|
* solver3: Avoid FTBFS with g++ 14.2 on arm{el,hf}Julian Andres Klode2025-06-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With an explicit {} initialization, g++ 14.2 on armhf and armel seems to generate the default constructor for the vector too early, or in the first place, outside of solver3.cc where the constructor is defined. Without {}, this compiles again. In file included from /usr/include/c++/14/vector:66, from /<<PKGBUILDDIR>>/obj-arm-linux-gnueabihf/include/apt-pkg/cachefilter.h:14: /usr/include/c++/14/bits/stl_vector.h: In instantiation of ‘constexpr std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = APT::Solver::Work; _Alloc = std::allocator<APT::Solver::Work>]’: /usr/include/c++/14/bits/stl_vector.h:531:7: required from here 531 | vector() = default; | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:369:49: error: invalid use of incomplete type ‘struct APT::Solver::Work’ 369 | _M_impl._M_end_of_storage - _M_impl._M_start); | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ In file included from /<<PKGBUILDDIR>>/apt-pkg/edsp.cc:22: /<<PKGBUILDDIR>>/obj-arm-linux-gnueabihf/include/apt-pkg/solver3.h:87:11: note: forward declaration of ‘struct APT::Solver::Work’ 87 | struct Work; | ^~~~ /usr/include/c++/14/bits/stl_vector.h: In instantiation of ‘constexpr std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = APT::Solver::Solved; _Alloc = std::allocator<APT::Solver::Solved>]’: /usr/include/c++/14/bits/stl_vector.h:531:7: required from here 531 | vector() = default; | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:369:49: error: invalid use of incomplete type ‘struct APT::Solver::Solved’ 369 | _M_impl._M_end_of_storage - _M_impl._M_start); | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /<<PKGBUILDDIR>>/obj-arm-linux-gnueabihf/include/apt-pkg/solver3.h:88:11: note: forward declaration of ‘struct APT::Solver::Solved’ 88 | struct Solved; | ^~~~~~
* Release 3.1.13.1.1Julian Andres Klode2025-06-108-9/+44
|
* Revert "doc: Increase visibility of special signs' usage"Julian Andres Klode2025-06-103-9/+9
| | | | | | This reverts commit 66ec0dfad8ac1d4d8646a4734eb9353f3ebc0a91. This creates too much churn in the translation.
* Avoid cast alignment warning in cache string viewJulian Andres Klode2025-06-101-1/+1
| | | | | | | | | | | | | | | | | | The cache allocates strings as uint16_t size; char content[]; char zero; Aligned to the uint16_t. When doing the casting, this causes a warning on some architectures that cannot do unaligned loads, such as armhf. Use __builtin_assume_aligned() to explictly say that the pointer is aligned to 16 bits. This is a bit of a backhanded approach, as the warning seems to be actually avoided by the function returning a void* rather than the assumed alignment, but this is very much self-documenting.
* Merge branch 'solver3' into 'main'Julian Andres Klode2025-06-104-3/+66
|\ | | | | | | | | solver3: various fixes See merge request apt-team/apt!492
| * solver3: Filter installed RecommendsJulian Andres Klode2025-06-102-0/+39
| | | | | | | | | | | | When inspecting Recommends of installed packages, filter them to the installed packages only, as we want to avoid switching between alternatives of recommended packages.
| * solver3: Explicitly declare and define ~SolverJulian Andres Klode2025-06-102-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On recent armfhf and s390x builds in the PPA, the compiler seems to have generated the destructor at the wrong point where the definitions where not yet complete, and it does seem ill-advised to rely on a default-constructed destructor in the solver for future ABI sake. In file included from /usr/include/c++/14/vector:66, from /<<PKGBUILDDIR>>/obj-arm-linux-gnueabihf/include/apt-pkg/cachefilter.h:14: /usr/include/c++/14/bits/stl_vector.h: In instantiation of ‘constexpr std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = APT::Solver::Work; _Alloc = std::allocator<APT::Solver::Work>]’: /usr/include/c++/14/bits/stl_vector.h:531:7: required from here 531 | vector() = default; | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:369:49: error: invalid use of incomplete type ‘struct APT::Solver::Work’ 369 | _M_impl._M_end_of_storage - _M_impl._M_start); | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ In file included from /<<PKGBUILDDIR>>/apt-pkg/edsp.cc:22: /<<PKGBUILDDIR>>/obj-arm-linux-gnueabihf/include/apt-pkg/solver3.h:87:11: note: forward declaration of ‘struct APT::Solver::Work’ 87 | struct Work; | ^~~~ /usr/include/c++/14/bits/stl_vector.h: In instantiation of ‘constexpr std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = APT::Solver::Solved; _Alloc = std::allocator<APT::Solver::Solved>]’: /usr/include/c++/14/bits/stl_vector.h:531:7: required from here 531 | vector() = default; | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:369:49: error: invalid use of incomplete type ‘struct APT::Solver::Solved’ 369 | _M_impl._M_end_of_storage - _M_impl._M_start); | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /<<PKGBUILDDIR>>/obj-arm-linux-gnueabihf/include/apt-pkg/solver3.h:88:11: note: forward declaration of ‘struct APT::Solver::Solved’ 88 | struct Solved; | ^~~~~~
| * solver3: Ignore Architecture: all for obsoleted-byJulian Andres Klode2025-06-102-3/+24
|/ | | | | | | | | | | | In case a new version of the source package is published, we check that if there's a newer binary for the same architecture and then consider the binary obsoleted. This logic did not properly account for Architecture: all packages which are considered as native architecture package with an "All" multi-arch flag set, and hence a native architecture package may inadvertently be considered obsoleted by a package that only built on Architecture: all.
* Merge branch 'doc-signs' into 'main'Julian Andres Klode2025-05-293-9/+9
|\ | | | | | | | | doc: Increase visibility of special signs' usage See merge request apt-team/apt!487
| * doc: Increase visibility of special signs' usageDaniel Lublin2025-05-293-9/+9
|/ | | | | | Closes: #310975 Signed-off-by: Daniel Lublin <daniel@lublin.se>
* Merge branch 'solver3' into 'main'Julian Andres Klode2025-05-282-6/+67
|\ | | | | | | | | solver3: Only merge dependencies on the same package See merge request apt-team/apt!486
| * solver3: Only merge dependencies on the same packageJulian Andres Klode2025-05-282-6/+67
|/ | | | | Avoid or groups and dependencies on different (virtual) packages, to avoid some common pitfalls like the added xorg test case.
* Merge branch 'solver3' into 'main'Julian Andres Klode2025-05-274-11/+250
|\ | | | | | | | | solver3: Merge intersecting dependencies See merge request apt-team/apt!485
| * solver3: Merge Depends into RecommendsJulian Andres Klode2025-05-272-7/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge any hard clauses into optional clauses, such that optional clauses don't end up with more choices. For example if you have Depends: a | b Recommends: a | c This becomes: Depends: a | b Recommends: a We have simulated this with the chaos-actor in the test case and a Depends: git (not satisfied by chaos provider) Recommends: git (satisfied by chaos provider) and the latter constraint is limited to the former.
| * solver3: Merge intersecting dependenciesJulian Andres Klode2025-05-274-11/+221
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a package declares multiple dependencies that can be solved by the same packages we should use the common set of packages to solve them. A common example is requiring the same Debian source version, or the same upstream version as in our test case: git-ng Depends: git (>> 1:2.26.2), git (<< 1:2.26.2-.) The solver expands this to the concrete objects: git-ng Depends: "real git" (= 1:2.26.2-1) | chaos-actor, "real git" (= 1:2.26.2-1) | "real git" (= 1:2.25.1-1) When given an upgrade request, the solver would now choose chaos-actor to satisfy git (>> 1:2.26.2) "real git" (= 1:2.25.1-1) to satisfy git (<< 1:2.26.2-.) To satisfy the two constraints, which is not the intended outcome. Address this problem by introducing a concept of merged clauses: If two dependencies of a package have overlapping solutions, replace the dependency by the intersection, and record the merged clause instead, this leads to a single clause: Depends: git (>> 1:2.26.2) and git (<< 1:2.26.2-.) which expands to just the real git binary. The implementation is a bit finicky in that it removes the variables from the original clause which may not be helpful for debugging, but it records the clauses merged with, as seen in the test case, so the reasoning is clear. LP: #2111792
* Merge branch 'solver3' into 'main'Julian Andres Klode2025-05-2610-36/+133
|\ | | | | | | | | solver3: Remove Work::choice See merge request apt-team/apt!484
| * solver3: Assume manual packagesJulian Andres Klode2025-05-269-18/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we have allowed the removal of manual packages, assume them all before starting the solver. This should ensure that as long as there is a solution that does not remove a manually installed package, it is found. This requires a sweeping set of changes in the test suite, but ensures that we get "safe" behavior from the solver. We have in particular seen that without asserting the installed packages, several people ended up with ubuntu-minimal and perl removed in a situation where that was not warranted, that is, they install winehq, and then pull in some new perl packages in a newer version than the installed one, and the solver chose to create a mismatched version set, which then caused the main perl package to not be installable. Oops: 1b55173a-3526-11f0-b7ac-fa163e171f02 Oops: dbd5149e-36b9-11f0-bb74-fa163ec44ecd
| * solver3: Initialize startTime if not set in Pop()Julian Andres Klode2025-05-262-1/+3
| | | | | | | | | | | | | | | | If the user pushes Assumptions that fail, we could inadvertently timeout during the Pop() as the variable was not initialized. Always initialize it to 0, and if we haven't set an actual time by the time we Pop() set it there.
| * solver3: Allow CompareProviders3 with empty packageJulian Andres Klode2025-05-261-1/+1
| | | | | | | | | | | | This can be used to compare arbitrary packages in non-dependency contexts. It remains to be seen whether this is a meaningful approach.
| * solver3: If no choice was made nothing to invertJulian Andres Klode2025-05-261-1/+1
| | | | | | | | | | | | | | | | | | We sometimes enqueue no choice as the choice, specifically when an optional clause became unsat as we need to reenqueue it on undo. But of course, this breaks undoing stuff because now it tries to insert !root and then solver breaks.
| * solver3: Handle failed assumption in Pop()Julian Andres Klode2025-05-261-0/+7
| | | | | | | | | | | | | | | | | | | | | | If an Assume() failed, we will have pushed the choices stack, but not actually pushed anything to the solved stack. This would cause a segmentation fault trying to read the referenced entry that doesn't actually exists, namely solved[solved.size()]. Handle this by exiting early as there's nothing to do except pop the entry back out of the array.
| * solver3: Remove Work::choiceJulian Andres Klode2025-05-262-15/+7
|/ | | | | | | | | | | | Instead of having the historic choice here, follow MiniSAT and use the assigned variable from the tail. This should also make the Assume() function work now, albeit we still need to actually migrate to it. This is a first step towards refactoring the Solve() loop to use a propagate/find next literal/assume it kind of loop, albeit there is a bit more to prepare there as we need to also reinsert work items when backtracking.
* Merge branch 'cxx23' into 'main'Julian Andres Klode2025-05-253-3/+3
|\ | | | | | | | | Bump CMAKE_CXX_STANDARD to 23 and fix code See merge request apt-team/apt!482
| * Bump CMAKE_CXX_STANDARD to 23 and fix codeJulian Andres Klode2025-05-253-3/+3
|/ | | | | | | | ftparchive/contents.h failed with operator< defined only, so define operator<=> instead. The operator and FileCopyType constructor both had a warning about not throwing and adding a noexcept, so add one
* Release 3.1.03.1.0Julian Andres Klode2025-05-196-5/+49
|
* Merge branch 'cherry' into 'main'Julian Andres Klode2025-05-194-8/+68
|\ | | | | | | | | Various cherry-picks See merge request apt-team/apt!480