summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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
| * Merge the three RAII vectors managing args lifetimeDavid Kalnischkies2021-03-091-90/+108
| | | | | | | | | | | | | | | | Having three different vectors littered over the method to manage various parts of the lifetime of the argument vector we are creating is a bit dangerous as it means a simple code change could result in a desync of these three, so by moving the functionality of them all into a wrapper class should prevent us from making such mistakes.
| * Handle multi-arch pkgnames for dpkg call via RAIIDavid Kalnischkies2021-03-091-11/+5
| |
| * Use RAII to clean up tmp dir for dpkg recursive installDavid Kalnischkies2021-03-091-10/+7
| | | | | | | | One less thing to remember to do in all branches.
| * Replace multi-statement macro with lambdaDavid Kalnischkies2021-03-091-42/+32
| | | | | | | | | | | | It is easy to make mistakes while dealing with such macros regardless of how much you guard them, so just using a lambda removes a lot of concerns here basically for free.
* | Check for and discard expected warning from MaybeAddAuthJulian Andres Klode2021-03-311-0/+5
| | | | | | | | | | | | | | | | | | MaybeAddAuth() here tells us that it refused to use the credentials for an http source; but that caused the test suite to fail at a later stage because we checked if there were any errors/warning. Strangely, this is only triggered with LTO enabled. Actually check that the warning is being set and then reject it.
* | Harden test for no new acquires after transaction abortHEADmasterDavid Kalnischkies2021-03-111-9/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | If a transaction is doomed we want to gracefully shutdown our zoo of worker processes. As explained in the referenced commit we do this by stopping the main process from handing out new work and ignoring the replies it gets from the workers, so that they eventually run out of work. We tested this previously by checking if a rred worker was given work items at all, but depending on how lucky the stars of the machine working on this are the worker would have already gotten work before the transaction was aborted – so we tried this 25 times a row (f35601e5d2). No machine can be this lucky, right? Turns out the autopkgtest armhf machine is very lucky. I feel a bit sorry for feeding grep such a long "line" to work with, but it seems to work out. Porterbox amdahl (who is considerably less lucky; had to turn down to 1 try to get it to fail sometimes) is now happily running the test in an endless loop. Of course, I could have broken the test now, but its still a rather generic grep (in some ways more generic even) and the main part of the testcase – the update process finishes and fails – is untouched. References: 38f8704e419ed93f433129e20df5611df6652620 Closes: #984966
* Release 2.3.02.3.0Julian Andres Klode2021-03-085-6/+17
|
* Merge branch 'fix/rredemptypatches' into 'master'Julian Andres Klode2021-03-086-39/+48
|\ | | | | | | | | Deal with rred shortcomings around empty patch files See merge request apt-team/apt!159
| * Ensure all index files sent custom tags to the methodsDavid Kalnischkies2021-03-072-5/+16
| | | | | | | | | | | | | | | | | | | | | | The mirror method can distribute requests for files based on various metadata bits, but some – the main index files – weren't actually passing those on to the methods as advertised in the manpage. This is hidden both by mirror usually falling back to other sources which will eventually hit the right one and that if the repository does not support by-hash apt will automatically stick to the mirror which was used for the Release file.
| * Start pdiff patching from the last possible starting pointDavid Kalnischkies2021-03-072-18/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Especially in small sections of an archive it can happen that an index returns to a previous state (e.g. if a package was first added and then removed with no other changes happening in between). The result is that we have multiple patches which start from the same hash which if we perform clientside merging is no problem although not ideal as we perform needless work. For serverside merging it would not matter, but due to rred previously refusing to merge zero-size patches but dak ignoring failure letting it carry these size-zero patches until they naturally expire we run into a problem as these broken patches won't do and force us to fall back to downloading the entire index. By always starting from the last patch instead of the first with the starter hash we can avoid this problem and behave optimally in clientside merge cases, too.
| * Rename pdiff merge patches only after they are all downloadedDavid Kalnischkies2021-03-073-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The rred method expects the patches to have a certain name, which we have to rename the file to before calling the method, but by delaying the rename we ensure that if the download of one of them fails and a successful fallback occurs they are all properly cleaned up as no longer useful while in the error case the next apt run can potentially pick them up as already downloaded. Our test-pdiff-usage test was encountering this every other run, but did not fail as the check for unaccounted files in partial/ was wrapped in a subshell so that the failure produced failing output, but did not change the exit code.
| * Allow merging with empty pdiff patchesDavid Kalnischkies2021-03-062-3/+8
|/ | | | | | | | There isn't a lot of sense in working on empty patches as they change nothing (quite literally), but they can be the result of merging multiple patches and so to not require our users to specifically detect and remove them, we can be nice and just ignore them instead of erroring out.
* Revert "Branch of as 2.2.y for bullseye"Julian Andres Klode2021-03-012-3/+3
| | | | | This reverts commit d96c9a0280bffcfb0f4a319e003e9af60c6cfaf1. It is not correct for master.
* Merge tag '2.2.1'Julian Andres Klode2021-03-0114-66/+132
|\ | | | | | | apt Debian release 2.2.1
| * Release 2.2.12.2.1Julian Andres Klode2021-03-015-6/+21
| |
| * regression fix: do require force-loopbreak for ConflictsJulian Andres Klode2021-03-012-16/+39
| | | | | | | | | | | | | | | | Conflicts do require removing the package temporarily, so they really should not be used. We need to improve that eventually such that we can deconfigure packages when we have to remove their dependencies due to conflicts.
| * RunScripts: Do not reset SIGQUIT and SIGINT to SIG_DFLJulian Andres Klode2021-03-011-4/+0
| | | | | | | | | | | | | | | | | | | | | | This caused python-apt to unset the Python signal handler when running update or install commands, breaking KeyboardInterrupt amongst possibly other things. We do not set those signal handlers in this functions, and the calling functions restore signal handlers to previous ones. LP: #1898026
| * Russian translation updateАлексей Шилин2021-02-241-10/+8
| | | | | | | | Closes: #983348
| * Remove .travis.yml, we are using GitLab CI these daysJulian Andres Klode2021-02-241-23/+0
| |
| * configuration: Add missing #include <array>Julian Andres Klode2021-02-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As user "DaOfficialRolex" on GitHub pointed out: This is needed to allow for APT on iOS to compile correctly. If not included the two following errors happen while compiling APT. ~/apt/apt-pkg/contrib/configuration.cc:900:44: error: constexpr variable cannot have non-literal type 'const std::array<APT::StringView, 3>' constexpr std::array<APT::StringView, 3> magicComments { "clear"_sv, "include"_sv, "x-apt-configure-index"_sv }; ^ ~/apt/apt-pkg/contrib/configuration.cc:900:44: error: implicit instantiation of undefined template 'std::__1::array<APT::StringView, 3>' /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__tuple:219:64: note: template is declared here template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array; ^