summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Release 2.3.52.3.5Julian Andres Klode2021-05-175-6/+12
|
* policy: Apply phasing to uninstalled packages tooJulian Andres Klode2021-05-172-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a package is not installed yet, we do need to apply phasing as we otherwise get into weird situations when installing packages: In the launchpad bug below, ubuntu-release-upgrader-core was installed, and hence the phasing for the upgrade to it was applied. However, ubuntu-release-upgrader-gtk was about to be installed - and hence the phasing did not apply, causing a version mismatch, because ubuntu-release-upgrader-gtk from -updates was used, but -core from release pocket. Sigh. An alternative approach to dealing with this issue could be to apply phasing to all packages within the same source package, which would work in most cases. However, there might be unforeseen side effects and it is of course possible to have = depends between source packages, such as -signed packages on the unsigned ones for bootloaders. This problem does not occur in the update-manager implementation of phased updates as update-manager only deals with upgrading packages, but does not install new packages and thus does not see that issue. APT however, has to apply phasing more broadly, as you can and often do install additional packages during upgrade, or upgrade packages during install commands, as both accept package list arguments and have the same code in the backend. LP: #1925745
* Release 2.3.42.3.4Julian Andres Klode2021-05-125-6/+16
|
* Turn TLS handshake issues into transient errorsJulian Andres Klode2021-05-122-1/+44
| | | | | | | This makes them retriable, and brings them more into line with TCP, where handshake is also a transient error. LP: #1928100
* Merge branch 'master' of https://github.com/kraj/aptJulian Andres Klode2021-05-051-0/+7
|\ | | | | | | See https://github.com/Debian/apt/pull/129
| * srvrec: Keep support for older resolverKhem Raj2021-03-201-0/+7
| | | | | | | | | | | | | | | | | | Some C libraries e.g. musl do not implement the new res_n* APIs therefore keep the old implementation as fallback and check __RES version macro to determine the API level Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Julian Andres Klode <julian.klode@canonical.com>
* | Release 2.3.32.3.3Julian Andres Klode2021-04-295-6/+24
| |
* | Temporarily Revert "2.3-only: Warn that the 0.1 protocol is deprecated"Julian Andres Klode2021-04-292-12/+7
| | | | | | | | This reverts commit 64127478630b676838735b509fec5cdfa36874c8.
* | Merge branch 'BrianMurray-main-patch-26842' into 'main'Julian Andres Klode2021-04-291-1/+1
|\ \ | | | | | | | | | | | | Fix a typo in json-hooks-protocol.md See merge request apt-team/apt!173
| * | Fix a typo in json-hooks-protocol.mdBrian Murray2021-04-281-1/+1
| | |
* | | Merge branch 'pu/upgradecounter' into 'main'Julian Andres Klode2021-04-299-42/+108
|\ \ \ | | | | | | | | | | | | | | | | Count uninstallable packages in "not upgraded" See merge request apt-team/apt!169
| * | | Count uninstallable packages in "not upgraded"David Kalnischkies2021-04-259-42/+108
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a first step of the solver can figure out that a package is uninstallable it might reset the candidate so that later steps are prevented from exploring this dead end. While that helps the resolver it can confuse the display of the found solution as this will include an incorrect count of packages not upgraded in this solution. It was possible before, but happens a fair bit more with the April/May resolver changes last year so finally doing proper counting is a good idea. Sadly this is a bit harder than just getting the number first and than subtracting the packages we upgraded from it as the user can influence candidates via the command line and a package which could be upgraded, but is removed instead shouldn't count as not upgraded as we clearly did something with it. So we keep a list of packages instead of a number which also help in the upgrade cmds as those want to show the list. Closes: #981535
* | | Merge branch 'pu/autoremove' into 'main'Julian Andres Klode2021-04-2914-94/+288
|\ \ \ | | | | | | | | | | | | | | | | Mark only provides from protected versioned kernel packages See merge request apt-team/apt!168
| * | | Store versioned kernel package detectors in d-pointerDavid Kalnischkies2021-04-261-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | They are kinda costly, so it makes more sense to keep them around in private storage rather than generate them all the time in the MarkPackage method. We do keep them lazy through as we have that implemented already.
| * | | Call MarkAndSweep only manually in apt-get for autoremoveDavid Kalnischkies2021-04-2612-45/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An interactive tool like aptitude needs these flags current far more often than we do as a user can see them in apt only in one very well defined place – the autoremove display block – so we don't need to run it up to four times while a normal "apt install" is processed as that is just busywork. The effect on runtime is minimal, as a single run doesn't take too long anyhow, but it cuts down tremendously on debug output at the expense of requiring some manual handholding. This is opt-in so that aptitude doesn't need to change nor do we need to change our own tools like "apt list" where it is working correctly as intended. A special flag and co is needed as we want to prevent the ActionGroup inside pkgDepCache::Init to be inhibited already so we need to insert ourselves while the DepCache is still in the process of being built. This is also the reason why the debug output in some tests changed to all unmarked, but that is fine as the marking could have been already obsoleted by the actions taken, just inhibited by a proper action group.
| * | | Reexplore providers of marked packages if some didn't satisfy beforeDavid Kalnischkies2021-04-264-81/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The autoremove algorithm would mark a package previously after exploring it once, but it could have been that it ignored some providers due to them not satisfying the (versioned) dependency. A later dependency which they might satisfy would encounter the package as already marked and hence doesn't explore the providers anymore leaving us with internal errors (as in the contrived new testcase). This is resolved by introducing a new flag denoting if we explored every provider already and only skip exploring if that is true, which sounds bad but is really not such a common occurrence that it seems noticeable in practice. It also helps us marking virtual packages as explored now which would previously be tried each time they are encountered mostly hiding this problem for the (far more common) fully virtual package.
| * | | Mark only provides from protected versioned kernel packagesDavid Kalnischkies2021-04-252-26/+161
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An out-of-tree kernel module which doesn't see many new versions can pile up a considerable amount of packages if it is depended on via another packages (e.g.: v4l2loopback-utils recommends v4l2loopback-modules) which in turn can prevent the old kernels from being removed if they happen to have a dependency on the images. To prevent this we check if a provider is a versioned kernel package (like an out-of-tree module) and if so check if that module package is part of the protected kernel set – if not it is probably good to go. We only do this if at least one provider is from a protected kernel though so that the dependency remains satisfied (this can happen e.g. if the module is currently not buildable against a protected kernel).
* | | Merge branch 'pu/commasallover' into 'main'Julian Andres Klode2021-04-292-11/+13
|\ \ \ | |/ / |/| | | | | | | | Allow superfluous commas in build-dependency lines See merge request apt-team/apt!167
| * | Allow superfluous commas in build-dependency linesDavid Kalnischkies2021-04-252-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | This code can interact with handwritten files who can have unneeded commas for writing easy. As dpkg allows it, we should do as well. Reported-By: Arnaud Ferraris <arnaud.ferraris@gmail.com> References: https://lists.debian.org/debian-devel/2021/03/msg00101.html
| * | Streamline or-group closing after other arch-specific packageDavid Kalnischkies2021-04-251-7/+3
|/ / | | | | | | | | | | | | | | The comment and code are a bit too roundabout about what they actually try to do, so lets just set that straight as this is really just about a very specific case and doesn't deserve a general resetting. Gbp-Dch: Ignore
* | Release 2.3.22.3.2Julian Andres Klode2021-04-235-6/+33
| |
* | doc: Single-line JSON encoding is still mandatoryJulian Andres Klode2021-04-231-2/+2
| | | | | | | | Gbp-Dch: ignore
* | Support deconfiguring Essential packagesJulian Andres Klode2021-04-232-27/+34
| | | | | | | | | | | | | | | | | | dpkg 1.20.8 also made --force-remove-essential optional for deconfiguring essential packages, so let's do this. Also extend the test case to make sure we actuall pass auto-deconfigure and do not make any --remove calls, or pass --force-remove to dpkg.
* | test/json: Make the test hook more reliableJulian Andres Klode2021-04-231-4/+11
| | | | | | | | | | | | Ugh, this was super flaky under -j 16 and -j 4, each behaving in slightly different ways. This seems to be stable now. No real bug though, all behaviors were OK.
* | Avoid infinite loop on EOF on media change promptJulian Andres Klode2021-04-231-1/+3
| | | | | | | | | | | | The code missed a break, so it was looping infinitely because the while loop condition only checked for '\n' and '\r', but not end of file.
* | Merge branch 'pu/json-hooks-21.04' into 'main'Julian Andres Klode2021-04-236-57/+301
|\ \ | | | | | | | | | | | | JSON Hooks 0.2 See merge request apt-team/apt!166
| * | 2.3-only: Warn that the 0.1 protocol is deprecatedJulian Andres Klode2021-04-232-7/+12
| | |
| * | json: Hook protocol 0.2 (added upgrade,downgrade,reinstall modes)Julian Andres Klode2021-04-233-41/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | Hook protocol 0.2 makes the new fields we added mandatory, and replaces `install` mode with `upgrade`, `downgrade`, `reinstall` where appropriate. Hook negotiation is hacky, but it's the best we can do for now. Users are advised to upgrade to 0.2
| * | json: Add `package-list` and `statistics` install hooksJulian Andres Klode2021-04-236-12/+52
| | | | | | | | | | | | This enables hooks to output additional information.
| * | upgrade: Add JSON hook support (AptCli::Hooks::Upgrade)Julian Andres Klode2021-04-232-7/+54
| | |
| * | json: Add origins fields to versionJulian Andres Klode2021-04-233-6/+55
| | | | | | | | | | | | | | | | | | Provide access to the origins of a package, such that tools can display information about them; for example, you can write a hook counting security upgrades.
* | | Merge branch 'pu/json-hooks-21.04-bugfixes' into 'main'Julian Andres Klode2021-04-233-4/+102
|\| | | | | | | | | | | | | | Bug fixes for JSON hooks See merge request apt-team/apt!165
| * | test: Set -e in our test hookJulian Andres Klode2021-04-231-0/+1
| | | | | | | | | | | | Gbp-Dch: ignore
| * | json: Flush standard file descriptors before calling hooksJulian Andres Klode2021-04-231-0/+8
| | | | | | | | | | | | This ensures messages are displayed in the correct order.
| * | json: Encode NULL strings as nullJulian Andres Klode2021-04-232-1/+12
| | | | | | | | | | | | This is the only nullable thing we have here.
| * | json: Actually pop statesJulian Andres Klode2021-04-232-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The JSON encoder only looked at the top state, but did not pop it, so if we nested objects, we got stuck in whatever the last state we pushed aside was, so in our example, we wrongly get a comma inserted _after_ key "b": {"a":[{}], "b":,[{}] }
| * | json: Escape strings using \u escape sequences, add testJulian Andres Klode2021-04-232-4/+65
|/ / | | | | | | | | | | | | | | This allows us to correctly encode strings containing quotation marks, escape characters and control characters. The test case is a bit nasty because it embeds private-cachefile.cc for linkage reasons.
* | Do not pass --force-remove-protected with --auto-deconfigureJulian Andres Klode2021-04-211-3/+0
| | | | | | | | dpkg 1.20.8 no longer requires this.
* | Require dpkg >= 1.20.8Julian Andres Klode2021-04-212-3/+3
| | | | | | | | | | | | We use a Breaks for the binary package instead of adding a versioned depends, as Breaks will cause apt solver to upgrade dpkg, while depends would make apt try to remove apt as first choice.
* | Merge branch 'pu/retry-3-times' into 'main'Julian Andres Klode2021-04-152-1/+10
|\ \ | | | | | | | | | | | | Automatically retry failed downloads 3 times See merge request apt-team/apt!164
| * | Automatically retry failed downloads 3 timesJulian Andres Klode2021-04-152-1/+10
|/ / | | | | | | | | | | | | | | | | Enable the Acquire::Retries option by default, set to 3. This will help with slightly unreliable networking; future work is needed for adding backoff and SRV/IP rotation. LP: #1876035 Gbp-Dch: full
* | Remove inversed comment for AllowUnsizedPackagesJulian Andres Klode2021-04-131-1/+1
| | | | | | | | It defaults to false, like the other options there do.
* | Release 2.3.12.3.1Julian Andres Klode2021-04-135-6/+27
| |
* | debian/gbp.conf: HEAD branch is main nowJulian Andres Klode2021-04-131-1/+1
| |
* | Merge branch 'pu/unsized-packages' into 'main'Julian Andres Klode2021-04-135-0/+59
|\ \ | | | | | | | | | | | | Fix downloads of unsized files that are largest in pipeline See merge request apt-team/apt!161
| * | Error on packages without a Size field (option Acquire::AllowUnsizedPackages)Julian Andres Klode2021-04-134-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | Repositories without Size information for packages are not proper and need fixing. This ensures people see an error in CI, and get notifications and hence the ability to fix it. It can be turned off by setting Acquire::AllowUnsizedPackages to true.
| * | Fix downloads of unsized files that are largest in pipelineJulian Andres Klode2021-04-132-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | The maximum request size is accidentally set to any sized file, so if an unsized file is present, and it turns out to be larger than the maximum size we set, we'd error out when checking if its size is smaller than the maximum request size. LP: #1921626
* | | Merge branch 'main' into 'main'Julian Andres Klode2021-04-132-0/+18
|\ \ \ | |/ / |/| | | | | | | | | | | | | | add vendor information for Procursus. https://github.com/ProcursusTeam/Procursus is a project to get an updated \*nix environment on Darwin platforms such as iOS and x86_64/arm64 macOS. See merge request apt-team/apt!163
| * | add vendor information for ProcursusCameron Katri2021-04-132-0/+18
| | |
* | | Merge branch 'cleanup/dpkgcallbuild' into 'main'Julian Andres Klode2021-04-131-115/+114
|\ \ \ | |/ / |/| | | | | | | | Replace macro and manual management with lambda and RAII See merge request apt-team/apt!160