summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Release 2.1.02.1.0Julian Andres Klode2020-05-044-4/+27
|
* doc/po: Merge nl with template, update templateJulian Andres Klode2020-05-042-4797/+7184
| | | | | | We did not merge nl with the template when we updated it, hence we have quite a bit of churn in that commit and this one.
* Merge branch 'pu/wildcards' into 'master'Julian Andres Klode2020-05-043-6/+44
|\ | | | | | | | | Reinstate * wildcards See merge request apt-team/apt!118
| * apt list: Fix behavior of regex vs fnmatch vs wildcardsJulian Andres Klode2020-05-042-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously (and still in cacheset), patterns where only allowed to start with ? or ~, which ignores the fact that a pattern might just as well start with a negation, such a !~nfoo. Also, we ignored the --regex flag if it looked like this, which was somewhat bad. Let's change this all: * If --regex is given, arguments are always interpreted as regex * If it is a valid package wildcard (name or * characters), then it will be interpreted as a wildcard - this set of characters is free from meaningful overlap with patterns. * Otherwise, the argument is interpreted as a pattern. For a future version, we need to adapt parsing for cacheset and list to use a common parser, to avoid differences in their interpretation. Likely, this code will go into the pattern parser, such that it generates a pattern given a valid fnmatch argument for example.
| * Reinstate * wildcardsJulian Andres Klode2020-05-042-2/+39
|/ | | | | | | | | | | | Reinstate * wildcards as they are safe to use, but do not allow any other special characters such as ? or []. Notably, ? would overlap with patterns, and [] might overlap with future pattern extensions (alternative bracketing style), it's also hard to explain. Closes: #953531 LP: #1872200
* Merge branch 'feature/markinstall' into 'master'Julian Andres Klode2020-05-049-250/+424
|\ | | | | | | | | Refactor MarkInstall fixing various or-group handling issues See merge request apt-team/apt!117
| * Protect a package while resolving in MarkInstallDavid Kalnischkies2020-04-274-39/+48
| | | | | | | | | | | | | | | | Strange things happen if while resolving the dependencies of a package said dependencies want to remove the package. The allow-scores test e.g. removed the preferred alternative in favor of the last one now that they were exclusive. In our or-group for Recommends we would "just" not statisfy the Recommends and for Depends we engage the ProblemResolver…
| * Prefer upgrading installed orgroup membersDavid Kalnischkies2020-04-273-57/+75
| | | | | | | | | | | | | | | | In normal upgrade scenarios this is no problem as the orgroup member will be marked for upgrade already, but on a not fully upgraded system (or while you operate on a different target release) we would go with our usual "first come first serve" approach which might lead us to install another provider who comes earlier – bad if the providers conflict.
| * Propagate Protected flag to single-option dependenciesDavid Kalnischkies2020-04-277-21/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a package is protected and has a dependency satisfied only by a single package (or conflicts with a package) this package must be part of the solution and so we can help later actions not exploring dead ends by propagating the protected flag to these "pseudo-protected" packages. An (obscure) bug this can help prevent (to some extend) is shown in test-apt-never-markauto-sections by not causing irreversible autobit transfers. As a sideeffect it seems also to help our crude ShowBroken to display slightly more helpful messages involving the packages which are actually in conflict.
| * Fail earlier on impossible Conflicts in MarkInstallDavid Kalnischkies2020-04-272-17/+24
| | | | | | | | | | | | | | | | MarkDelete is not recursive as MarkInstall is and we can not conflict with ourselves anyhow, so we can move the unavoidable deletes before changing the state of the package in question avoiding the need for the state update in case of conflicts we can not deal with (e.g. the package conflicts with an explicit user request).
| * Split up MarkInstall into private helper methodsDavid Kalnischkies2020-04-272-64/+113
| | | | | | | | | | Should be easier to move the code bits around then and it helps in documenting a bit what the blocks do and how they interact (or not).
| * Discard candidate if its dependencies can't be satisfiedDavid Kalnischkies2020-04-272-1/+17
| | | | | | | | | | | | We do pretty much the same in IsInstallOk, but here we have already set the state, so we have to unroll the state as well to sort-of replicate the state we were in before this MarkInstall failed.
| * Refactor and reorder MarkInstall codeDavid Kalnischkies2020-04-271-134/+145
| | | | | | | | | | | | | | This fixes no bugs per se, but the idea is to delay more costly changes and check easier things first. It e.g. inhibits the moving of the autobit until we are sure that this MarkInstall call isn't going to fail (e.g. because a dependency isn't satisfiable).
| * Explore or-groups for Recommends further than firstDavid Kalnischkies2020-04-272-30/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | MarkInstall only looks at the first alternative in an or-group which has a fighting chance of being satisfiable (= the package itself satisfies the dependency, if it is installable itself is not considered). This is "hidden" for Depends by the problem resolver who will try another member of the or-group later, but Recommends are not a problem for it, so for them the alternatives are never further explored. Exploring the or-group in MarkInstall seems like the better choice for both types as that frees the problem resolver to deal with the hard things like package conflicts.
| * Discard impossible candidate versions also for non-installedDavid Kalnischkies2020-04-262-27/+22
|/ | | | | | | | We reseted the candidate for installed packages back to the version which is installed if one of the (critical) dependencies of it is not statisfiable, but we can do the same for non-installed packages by discarding the candidate which beside slightly helping the resolver also improves error messages generated by apt as a sideeffect.
* Avoid -Wuseless-cast to intDavid Kalnischkies2020-04-261-2/+2
| | | | | Reported-By: gcc -Wuseless-cast Gbp-Dch: Ignore
* Add correct std namespace to nullptr_tDavid Kalnischkies2020-04-261-3/+3
| | | | | Reported-By: clangd Gbp-Dch: Ignore
* Dutch manpages translation updateFrans Spiesschaert2020-04-221-7787/+4871
| | | | Closes: #956313
* Release 2.0.22.0.2Julian Andres Klode2020-04-096-7/+30
|
* Merge branch 'pu/user-agent-include-service' into 'master'Julian Andres Klode2020-04-094-2/+23
|\ | | | | | | | | ubuntu: http: Add non-interactive to user agent if run by systemd See merge request apt-team/apt!114
| * ubuntu: http: Add non-interactive to user agent if run by systemdJulian Andres Klode2020-04-094-2/+23
|/ | | | | | | | | | | | | | | Include that apt is being run from a service in the user agent, so traffic can be analysed for interactive vs non-interactive use, and prioritised accordingly. It looks like this now: User-Agent: Debian APT-HTTP/1.3 (2.0.1) non-interactive A previous version included the full service names, but this raised some privacy concerns. LP: #1825000
* test/integration/apt.pem: Regenerate with SHA2 hashesJulian Andres Klode2020-04-061-45/+45
| | | | | | | | | Recent GnuTLS 3.6.11 -> 3.6.13 update in Ubuntu broke our test certificate, it's signed with SHA1. Regenerate with SHA2. openssl req -newkey rsa:2048 -x509 -sha256 -days 36500 -nodes -out apt.crt -keyout apt.key -subj "/CN=localhost/O=APT Testcases GmbH/ST=Some-State/C=DE" cat apt.key apt.crt > test/integration/apt.pem
* Fix "string match{ing,es}" and whitespace typo in apt-patterns(7)Chris Leick2020-04-0511-26/+24
|
* German manpage translation updateChris Leick2020-04-051-121/+187
|
* Fix gramma in apt(8): "by append(+ing) a"Marco Ippolito2020-04-0511-12/+12
| | | | Closes: #955412
* Dutch program translation updateFrans Spiesschaert2020-04-051-612/+25
| | | | Closes: #955505
* Simplified Chinese program translation updateBoyuan Yang2020-03-271-47/+33
| | | | Closes: #955023
* Release 2.0.12.0.1Julian Andres Klode2020-03-2448-49/+240
|
* Merge branch 'pu/colored-error' into 'master'Julian Andres Klode2020-03-243-25/+92
|\ | | | | | | | | Add color highlighting to E:/W:/N: prefixes See merge request apt-team/apt!112
| * configure-index: Add APT::Color optionJulian Andres Klode2020-03-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | This caused unbound error list growth, because each time we dumped an error, the calls to _config->FindB() inside operator << would add 3 new errors of the form: W: Using unknown config option »apt::color« of type BOOL Hence we are dumping an infinite list of errors, and eventually that list will exceed available memory.
| * Add color highlighting to E:/W:/N: prefixesJulian Andres Klode2020-03-241-0/+46
| | | | | | | | | | | | This matches the definitions used by dpkg. Closes: #953527
| * error: Extract operator<< into error.cc (de-inline it)Julian Andres Klode2020-03-102-25/+45
| | | | | | | | | | Extract the code, and reformat it with clang-format so we can modify it.
* | Merge branch 'pu/analyze-pattern' into 'master'Julian Andres Klode2020-03-241-0/+32
|\ \ | | | | | | | | | | | | apt-helper: Add analyze-pattern helper See merge request apt-team/apt!113
| * | apt-helper: Add analyze-pattern helperJulian Andres Klode2020-03-121-0/+32
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | The analyze-pattern helper parses a pattern and then renders the parsed pattern, allowing you to analyze how the parser interpreted the string. This can be useful to analyse (yes, analyse-pattern also works) why a pattern is different from aptitude or why it does not work as expected. It can also be used to check if apt has pattern support, although that will miss out on the version shipped in eoan, but who really cares about that longer term anyway?
* | Russian program translation updateАлексей Шилин2020-03-211-32/+29
| | | | | | | | Closes: #953804
* | Parse last line in deb file correctly by adding a newlineDavid Kalnischkies2020-03-212-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While merging apt-pkg and apt-inst libraries the codepath of handling deb files in apt-pkg was adapted to use the 'old' code from apt-inst instead of fork&exec of dpkg-deb -I. The information we get this way forms the main part of the package stanza, but we add a few semi-optional fields to the stanza to make it look and work more like a stanza we got from a repository. Just be careful with the area where these two parts touch as if, hypothetically, we would stip all newlines around the parts, but forget to add a newline between them later, the two lines around the merge would stick a bit too close together forming one which could result in fun parsing errors if this merged line was previously e.g. a well-formed Depends line and has now extra fluff attached. This codepath has a history with too many newlines (#802553) though, so how likely is it really that it will some day lack one you may ask. References: 6089a4b17c61ef30b2efc00e270b0907f51f352a
* | Don't crash pattern matching sections if pkg has no sectionDavid Kalnischkies2020-03-102-2/+25
|/ | | | | | | | Packages from third-party sources do not always follow the established patterns of more properly maintained archives. In that case it was a driver package for a scanner&printer device which has only a minimum of info attached, but also minimal non-installed packages do not include sections, so we really shouldn't assume their availability.
* Release 2.0.02.0.0Julian Andres Klode2020-03-0748-137/+575
|
* Merge branch 'pu/improve-locking-msgs' into 'master'Julian Andres Klode2020-03-065-7/+25
|\ | | | | | | | | Pu/improve locking msgs See merge request apt-team/apt!111
| * Show absolute time while waiting for lock instead of %, rework messageJulian Andres Klode2020-03-064-5/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Showing a percentage for a timeout is pretty non-standard. Rework the progress class so it can show an absolute progress (currently hardcoded to use seconds as a unit). If there is a timeout (aka if it's not the maximum long long unsigned -1llu), then show the timeout, otherwise just count up seconds, e.g. Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 33842 (apt)... 1/120s or Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 33842 (apt)... 1s Also improve the error message to use "Waiting for cache lock: %s" instead of "... (%s)", as having multiple sentences inside parenthesis is super weird, as is having two closing parens. We pass the information via _config, as that's reasonably easy and avoids ABI hackage. It also provides an interesting debugging tool for other kinds of progress.
| * GetLock: No strerror if it's just another process holding the lockJulian Andres Klode2020-03-061-2/+4
|/ | | | | | | | This improves the locking message, getting rid of useless details. If we have a process holding the lock, we got that because the lock is being hold by it, so there's no point telling the people the reason for not getting the lock is the EAGAIN error and displaying its strerrror().
* Release 1.9.121.9.12Julian Andres Klode2020-02-275-6/+13
|
* (temporarily) unhide pkgDPkgPM again to have python-apt compileJulian Andres Klode2020-02-271-1/+1
|
* pkgcache: Add operator bool() to map_pointerJulian Andres Klode2020-02-271-0/+1
|
* Release 1.9.111.9.11Julian Andres Klode2020-02-2659-104/+1116
|
* Merge branch 'pu/wait-lock' into 'master'Julian Andres Klode2020-02-269-14/+68
|\ | | | | | | | | Pu/wait lock See merge request apt-team/apt!109
| * apt(8): Wait for frontend and cache lockJulian Andres Klode2020-02-269-14/+68
| | | | | | | | | | | | This is a rework of !6 with additional stuff for the frontend lock, so we can lock the frontend lock and then keep looping over dpkg lock.
* | Merge branch 'pu/visibility' into 'master'Julian Andres Klode2020-02-2655-359/+264
|\| | | | | | | | | apt-pkg: default visibility to hidden See merge request apt-team/apt!108
| * apt-pkg: default visibility to hiddenJulian Andres Klode2020-02-2655-359/+264
|/
* Merge branch 'pu/misc' into 'master'Julian Andres Klode2020-02-269-59/+117
|\ | | | | | | | | Pu/misc See merge request apt-team/apt!107