summaryrefslogtreecommitdiff
path: root/apt-private/private-cacheset.h
Commit message (Collapse)AuthorAgeFilesLines
* drop some needlessly public declarations in libapt-privateDavid Kalnischkies2015-11-291-3/+3
| | | | Git-Dch: Ignore
* apply various suggestions made by cppcheckDavid Kalnischkies2015-11-051-1/+1
| | | | | Reported-By: cppcheck Git-Dch: Ignore
* implement dpkgs vision of interpreting pkg:<arch> dependenciesDavid Kalnischkies2015-09-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | How the Multi-Arch field and pkg:<arch> dependencies interact was discussed at DebConf15 in the "MultiArch BoF". dpkg and apt (among other tools like dose) had a different interpretation in certain scenarios which we resolved by agreeing on dpkg view – and this commit realizes this agreement in code. As was the case so far libapt sticks to the idea of trying to hide MultiArch as much as possible from individual frontends and instead translates it to good old SingleArch. There are certainly situations which can be improved in frontends if they know that MultiArch is upon them, but these are improvements – not necessary changes needed to unbreak a frontend. The implementation idea is simple: If we parse a dependency on foo:amd64 the dependency is formed on a package 'foo:amd64' of arch 'any'. This package is provided by package 'foo' of arch 'amd64', but not by 'foo' of arch 'i386'. Both of those foo packages provide each other through (assuming foo is M-A:foreign) to allow a dependency on 'foo' to be satisfied by either foo of amd64 or i386. Packages can also declare to provide 'foo:amd64' which is translated to providing 'foo:amd64:any' as well. This indirection over provides was chosen as the alternative would be to teach dependency resolvers how to deal with architecture specific dependencies – which violates the design idea of avoiding resolver changes, especially as architecture-specific dependencies are a cornercase with quite a few subtil rules. Handling it all over versioned provides as we already did for M-A in general seems much simpler as it just works for them. This switch to :any has actually a "surprising" benefit as well: Even frontends showing a package name via .Name() [which doesn't show the architecture] will display the "architecture" for dependencies in which it was explicitely requested, while we will not show the 'strange' :any arch in FullName(true) [= pretty-print] either. Before you had to specialcase these and by default you wouldn't get these details shown. The only identifiable disadvantage is that this complicates error reporting and handling. apt-get's ShowBroken has existing problems with virtual packages [it just shows the name without any reason], so that has to be worked on eventually. The other case is that detecting if a package is completely unknown or if it was at least referenced somewhere needs to acount for this "split" – not that it makes a practical difference which error is shown… but its one of the improvements possible.
* headers are for declarations onlyDavid Kalnischkies2015-08-101-214/+35
| | | | | | | | Housekeeping. This used to be embedded in apt-get directly, then moved to into our (then new) private lib and now header and code get a proper separation. Git-Dch: Ignore
* implement a more generic ShowList methodDavid Kalnischkies2015-08-101-7/+9
| | | | | | | | | | | | | | | apt-get is displaying various lists of package names, which until now it was building as a string before passing it to ShowList, which inserted linebreaks at fitting points and showed a title if needed, but it never really understood what it was working with. With the help of C++11 the new generic knows not only what it works with, but generates the list on the fly rather than asking for it and potentially discarding parts of the input (= the non-default verbose display). It also doubles as a test for how usable the CacheSets are with C++11. (Not all callers are adapted yet.) Git-Dch: Ignore
* add c++11 override marker to overridden methodsDavid Kalnischkies2015-08-101-8/+8
| | | | | | | | | C++11 adds the 'override' specifier to mark that a method is overriding a base class method and error out if not. We hide it in the APT_OVERRIDE macro to ensure that we keep compiling in pre-c++11 standards. Reported-By: clang-modernize -add-override -override-macros Git-Dch: Ignore
* fix memory leaks reported by -fsanitizeDavid Kalnischkies2015-08-101-4/+9
| | | | | | | | Various small leaks here and there. Nothing particularily big, but still good to fix. Found by the sanitizers while running our testcases. Reported-By: gcc -fsanitize Git-Dch: Ignore
* adapt to the new CacheSetHelper APIDavid Kalnischkies2014-09-271-14/+11
| | | | Git-Dch: Ignore
* make GetLocalitySortedVersionSet more genericDavid Kalnischkies2014-09-071-6/+6
| | | | | | | | | No reason in and of by itself at the moment, but prepares for the goal of having 'apt search' and 'apt-cache search' using the same code now that they at least support the same stuff. The 'apt' code is just a multitude slower at the moment… Git-Dch: Ignore
* cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-131-0/+15
| | | | | | | | Beside being a bit cleaner it hopefully also resolves oddball problems I have with high levels of parallel jobs. Git-Dch: Ignore Reported-By: iwyu (include-what-you-use)
* warning: unused parameter ‘foo’ [-Wunused-parameter]David Kalnischkies2014-03-131-4/+4
| | | | | Reported-By: gcc -Wunused-parameter Git-Dch: Ignore
* add missing canNotFindFnmatch/showFnmatchSelection (for the next ABI break)Michael Vogt2014-02-141-0/+5
|
* squash merge of the feature/apt-binary branch without the changes from ↵Michael Vogt2013-08-121-0/+265
experimental