summaryrefslogtreecommitdiff
path: root/apt-pkg
AgeCommit message (Collapse)Author
2019-11-26Fix some style warnings from cppcheckDavid Kalnischkies
Unused variable, std::algorithms instead of raw for-loops. There should be no observeable difference in behaviour. Reported-By: cppcheck Gbp-Dch: Ignore
2019-11-25Fix progress bar width for multibyte charsetsАлексей Шилин
When using locale in which symbols occupy more than 1 byte (for example, ru_RU.UTF-8), the progress bar width was calculated incorrectly because std::string::size() returns the number of bytes rather than the number of actual characters. Use the newly introduced APT::String::DisplayLength() to calculate the width instead.
2019-11-25strutl: Add APT::String::DisplayLength() functionАлексей Шилин
Returns string length, but unlike std::string::size() it honors multibyte characters. This allows to properly calculate visible sizes of console messages.
2019-11-25Search in all available description translationsАлексей Шилин
When multiple translations of package descriptions are available, perform search in all of them. It allows using search patterns in any of the configured languages. Previously, only the first available translation was searched. As the result, patterns in e.g. English never matched packages which had their descriptions translated into local language. Closes: #490000
2019-09-19Pass --abort-after=1 to dpkg when using --force-dependsJulian Andres Klode
Using --force-depends causes dpkg to continue removing packages a package depends upon even if that package fails to be removed, because dpkg turns off all sanity checks. So we gotta tell dpkg to stop immediately if there's an error removing stuff. Closes: #935910 LP: #1844634
2019-08-22srvrec: Use re-entrant resolver functionsJulian Andres Klode
This should probably make those functions thread-safe, which might be useful for some external users.
2019-08-19patterns: Allow more complex wordsJulian Andres Klode
Only disallow ,() and on the start of a word also ~ and ?. Make sure to include \0 as disallowed.
2019-08-15patterns: Improve error reporting at end of argument listJulian Andres Klode
2019-08-15Add ?virtual patternJulian Andres Klode
This matches any package that does not have versions.
2019-08-15Add the ?exact-name patternJulian Andres Klode
The ?exact-name pattern matches the name exactly, there is no substring matching going on, or any regular expression or fnmatch magic.
2019-08-15Add ?essential patternJulian Andres Klode
This matches all packages where at least one of the versions is marked essential; or well, whenver apt considers a package essential.
2019-08-15Add ?broken patternJulian Andres Klode
This matches all packages that have broken dependencies in the installed version or the version selected for install.
2019-08-15Add ?config-files and ?installed patternsJulian Andres Klode
These two are mutually exclusive states of installed-ness. And ?installed package is fully unpacked and configured; a ?config-files package only has config files left.
2019-08-15Add ?obsolete and ?upgradable patternsJulian Andres Klode
These match packages that have no version in a repository, or where an upgrade is available. Notably, ?and(?obsolete,?upgradable) == ?false because an upgradable package is by definition not obsolete.
2019-08-15Add ?automatic and ?garbage patternsJulian Andres Klode
These patterns allow you to identify automatically installed packages, as well as automatically installed packages that are no longer reachable from the manually installed ones.
2019-08-15Add patterns for the existing CacheFilter::Matcher classesJulian Andres Klode
This implements the basic logic patterns: ?and ?false ?not ?or ?true and the basic package patterns: ?architecture ?name ?x-name-fnmatch
2019-08-15Add pattern tree parser infra and connect with cacheset and apt listJulian Andres Klode
This adds a transformation from parse tree into a CacheFilter and connects it with cachesets and the apt list command.
2019-08-15Add initial support for parsing patterns into parse treesJulian Andres Klode
Introduce a parser for patterns that generates a parse tree. The language understood by the parser is: pattern = '?'TERM | '?'TERM '(' pattern (',' pattern)* ','? ')' | WORD | QUOTED-WORD TERM = [0-9a-zA-Z-] WORD = [0-9a-ZA-Z-.*^$\[\]_\\] QUOTED_WORD = "..." # you know what I mean This language is context free, which is a massive simplification from aptitude's language, where ?foo(bar) could have two different meanings depending on whether ?foo takes an argument or not.
2019-08-15Fix segfault in pkgAcquire::Enqueue() with Acquire::Queue-Mode=accessJulian Andres Klode
In commit 79b1a8298, QueueName() was changed, amongst other things, to exit early when the queue mode was single access, as single access does not need any fancy queue name. The exit became too early though, as Config was not initialized anymore, but the caller was relying on it. Fix QueueName() to always initialize Config and in Enqueue() initialize Config with a nullptr, so if this regresses it's guaranteed to fail harder. Also add a test case - this is very simple, but the first and only test case for access queue mode. Regression-Of: 79b1a82983e737e74359bc306d9edb357c5bdd46 LP: #1839714
2019-08-05Merge branch 'pu/locking-msg' into 'master'Julian Andres Klode
Improve locking messaging - pid and name, "do not remove lock file" See merge request apt-team/apt!68
2019-07-10Fix typos reported by codespell in code commentsDavid Kalnischkies
Also in old changelogs, but nothing really user visible like error messages or alike so barely noteworthy. Reported-By: codespell Gbp-Dch: Ignore
2019-07-08Apply various suggestions by cppcheckDavid Kalnischkies
Reported-By: cppcheck
2019-07-08Show details about the package with bad ProvidesDavid Kalnischkies
The error messages say only which package it was trying to provide, but not which package & version tried it which can be misleading as to which package (version) is the offender. References: #930256
2019-07-08Distribute host-less work based on backlog of the queuesDavid Kalnischkies
Work like applying patches via rred can be performed by many concurrent rred processes, but we can't just spawn new ones forever: We limit us to the number of CPUs which can drive them and reuse existing ones if they have nothing to do at the moment. The problem arises if we have reached the limit of queues and all of them are busy which is more likely to happen on "slow" machines with few CPUs. In this case we opted for random distribution, but that can result in many big files (e.g. Contents) being added to one queue while the others get none or only small files. Ideally we would ask the methods how much they still have to do, but they only know that for the current item, not for all items in the queue, so we use the filesize of the expected result.
2019-06-21Improve locking messaging - pid and name, "do not remove lock file"Julian Andres Klode
We want to tell users which process is holding the lock so they can easily understand what's going on, and we want to advise users not to remove the lock file, because ugh, that's bad. Re-initalize the flock structure, in case it got mangled by previous fcntl call.
2019-06-17RFC1123StrToTime: Accept const std::string& as first argumentJulian Andres Klode
We are converting to std::string anyway by passing to istringstream, and this removes the need for .c_str() in callers.
2019-06-14policy: Get rid of Pins arrayJulian Andres Klode
Gbp-Dch: ignore
2019-06-14policy: Remove GetMatch and GetPriority(pkgIterator)Julian Andres Klode
These functions do not produce any useful results anymore, so it's pointless to keep them around.
2019-06-14Remove deprecated cacheset methodsJulian Andres Klode
This mostly turns them private and then overrides the public version with the switch, as recommended.
2019-06-12Bump cache MajorVersion to 16Julian Andres Klode
1.6 was 13, so 1.7 has 14 reserved, and 1.8 has 15 reserved, so let's use 16 for 1.9 for now.
2019-06-12Adjust code for missing includes/using std::stringJulian Andres Klode
2019-06-12Run unifdef -DAPT_{8,9,10,15}_CLEANER_HEADERSJulian Andres Klode
2019-06-11Do not include squashfs file systems in df output.Brian Murray
LP: #1756595 Fixes Debian/apt#94
2019-06-11Update symbols and hide some pkgTagSection ABIJulian Andres Klode
Gbp-Dch: ignore
2019-06-11Merge the ParseDepends functionsJulian Andres Klode
2019-06-11Allow comparing string to StringViewJulian Andres Klode
2019-06-11Make APT::StringView publicJulian Andres Klode
2019-06-11Merge tag '1.8.2'Julian Andres Klode
apt Debian release 1.8.2
2019-05-21Unlock dpkg locks in reverse locking orderJulian Andres Klode
We need to unlock in the reverse order of locking in order to get useful behavior. LP: #1829860
2019-05-07debmetaindex: Use isspace_ascii() variant to normalize Signed-ByJulian Andres Klode
Using the locale-dependent isspace() function here opens us up to strange locale-dependent behavior.
2019-05-06CMake: Enforce "override" use on overriden methodsJulian Andres Klode
This ensures that we do not accidentally stop overriding a method because it's signature changed in an API break.
2019-05-06Change soname to libapt-pkg.so.5.90Julian Andres Klode
This is a bit experimental, and we'll go through a few stages before reaching libapt-pkg.so.6.0.
2019-05-06cacheset: Remove simple cases of deprecated codeJulian Andres Klode
This is missing the ones that are still actively used in cacheset.cc, we need to clean those up too, but they are obviously more tricky.
2019-05-06Use debDebFile to get control file instead of dpkg-debJulian Andres Klode
2019-05-06Merge libapt-inst into libapt-pkgJulian Andres Klode
2019-05-03Prevent shutdown while running dpkgJulian Andres Klode
As long as we are running dpkg, keep an inhibitor that blocks us from shutting down. LP: #1820886
2019-05-03Prevent shutdown while running dpkgJulian Andres Klode
As long as we are running dpkg, keep an inhibitor that blocks us from shutting down. LP: #1820886
2019-04-30apt-pkg: URI: Add 'explicit' to single argument constructorJulian Andres Klode
This needs a fair amount of changes elsewhere in the code, hence this is separate from the previous commits.
2019-04-30apt-pkg: hashes: Add 'explicit' to single argument constructorsJulian Andres Klode
This avoids funny code where strings get implicitly converted to HashString or HashStringList.
2019-04-30Add 'explicit' to most single argument constructorsJulian Andres Klode
This prevents implicit conversions that we do not want, such as having a FileFd* being converted to a debListParser. Two cases are not yet handled because they require changes in code using them: 1. The classes in hashes.h 2. The URI class - this one is used quite a lot