summaryrefslogtreecommitdiff
path: root/apt-pkg/cacheset.h
Commit message (Collapse)AuthorAgeFilesLines
* add messages to our deprecation warnings in libaptDavid Kalnischkies2015-11-271-41/+36
| | | | Git-Dch: Ignore
* add cacheset push_back wrapping for std::back_inserterDavid Kalnischkies2015-11-041-1/+27
| | | | | | | | | | | | As usual by now, not all containers wrapped by the cacheset containers support all methods, like push_back now, but they fail on use of these unusable methods only. Would be nice to not expose these methods for unsupporting containers at all, but that means either a lot of classes or a lot of std::enable_if magic, which seems like too big work for this small wrapper for now. Git-Dch: Ignore
* implement operator* for cacheset iteratorsDavid Kalnischkies2015-11-041-1/+20
| | | | | | | | | | | | | | | | Technically an abi-break as we change a template parameter to std::iterator for this, but this class is empty in all instances and just causes the right typedefs to be set – which were incorrect as detected by std::stable_partition as its implementation uses ::pointer and needs also a operator* implementation. In practice CacheSets have no external users (yet) and the difference is visible only at compile time (which was an error before and now works), not while linking. The changes to apt-mark are functionally identical to the code before, just that we use a std:: algorithm now instead of trying hard on our own.
* cacheset: Fix compilation on new GCC in C++98 modeJulian Andres Klode2015-10-301-3/+3
| | | | | | | | | | | | | Since gcc 4.9, the API for erase slightly changed. In commit 3dddcdf2432e78f37c74d8c76c2c519a8d935ab2 the existing checks for __cplusplus where changed to check the gcc version, as the __cplusplus check did nothing, because gcc 4.8 already provided the standard value in there. Fix the code to check for the gcc version in two more places, and change the existing checks to use a convenience macro.
* Re-add support for G++ 4.8 and configure travis to use itJulian Andres Klode2015-08-171-2/+2
| | | | | | This makes tests work again! Gbp-Dch: ignore
* avoid virtual in the iteratorsDavid Kalnischkies2015-08-101-34/+29
| | | | | | | | With a bit of trickery and the Curiously recurring template pattern we can free us from our use of virtual in the iterators were it is unneeded bloat as we never deal with pointers to iterators and similar such. Git-Dch: Ignore
* show or-groups in not-installed recommends and suggests listsDavid Kalnischkies2015-08-101-3/+3
| | | | | | | | Further abstracting our new ShowList allows to use it for containers of strings as well giving us the option to implement an or-groups display for the recommends and suggests lists which is a nice trick given that it also helps with migrating the last remaining other cases of old ShowList.
* implement a more generic ShowList methodDavid Kalnischkies2015-08-101-20/+79
| | | | | | | | | | | | | | | 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
* implement reverse_iterators for cachesetsDavid Kalnischkies2015-08-101-188/+161
| | | | | | | | By further abstracting the iterator templates we can wrap the reverse iterators of the wrapped containers and share code in a way that iterator creating is now more template intensive, but shorter in code. Git-Dch: Ignore
* prepare cachesets for -std=c++11David Kalnischkies2015-08-101-62/+222
| | | | | | | | | | | | | | | | | | | The "problem" is mostly in the erase() definitions as they slightly conflict and in pre-c++11 are not uniformly in different containers. By differenciating based on the standard we can provide erase() methods for both standards – and as the method is in a template and inline we don't need to worry about symbols here. The rest is adding wrappings for the new forward_list and unordered_set containers and correcting our iterators to use the same trait as the iterator they are wrapping instead of having all of them be simple forward iterators. This allows the use of specialized algorithms which are picked based on iterator_traits and implementing them all is simple to do as we can declare all methods easily and only if they are called they will generate errors (if the underlying iterator doesn't support these). Git-Dch: Ignore
* cleanup Container.erase API to look more like std::containersDavid Kalnischkies2015-08-101-14/+16
| | | | | | | | C++11 slightly changes the API again to const_iterator, but we are find with iterators in the C++03 style for now as long as they look and behave equally to the methods of the standard containers. Git-Dch: Ignore
* make all d-pointer * const pointersDavid Kalnischkies2015-08-101-4/+6
| | | | | | | | | | | | | | Doing this disables the implicit copy assignment operator (among others) which would cause hovac if used on the classes as it would just copy the pointer, not the data the d-pointer points to. For most of the classes we don't need a copy assignment operator anyway and in many classes it was broken before as many contain a pointer of some sort. Only for our Cacheset Container interfaces we define an explicit copy assignment operator which could later be implemented to copy the data from one d-pointer to the other if we need it. Git-Dch: Ignore
* apply various style suggestions by cppcheckDavid Kalnischkies2015-08-101-7/+7
| | | | | | | Some of them modify the ABI, but given that we prepare a big one already, these few hardly count for much. Git-Dch: Ignore
* add d-pointer, virtual destructors and de-inline de/constructorsDavid Kalnischkies2015-06-161-7/+17
| | | | | | | | To have a chance to keep the ABI for a while we need all three to team up. One of them missing and we might loose, so ensuring that they are available is a very tedious but needed task once in a while. Git-Dch: Ignore
* fix some new compiler warnings reported by gcc-5David Kalnischkies2015-03-161-1/+3
| | | | Git-Dch: Ignore
* replace ignore-deprecated #pragma dance with _PragmaDavid Kalnischkies2014-11-081-92/+26
| | | | | | | | | For compatibility we use/provide and fill quiet some deprecated methods and fields, which subsequently earns us a warning for using them. These warnings therefore have to be disabled for these codeparts and that is what this change does now in a slightly more elegant way. Git-Dch: Ignore
* mark private methods as hiddenDavid Kalnischkies2014-09-301-8/+8
| | | | | | | | | | We are the only possible users of private methods, so we are also the only users who can potentially export them via using them in inline methods. The point is: We don't need these symbols exported if we don't do this, so marking them as hidden removes some methods from the API without breaking anything as nobody could have used them. Git-Dch: Ignore
* move PCI::From* methods into CacheSetHelper classDavid Kalnischkies2014-09-271-31/+71
| | | | | | | | | | | | | | The methods itself deal with the helper a lot, so it makes sense to move them to the helper itself, which helps also if we want to override some of these methods, the FromString mentioned in the bugreport being the obvious example. VCI is spared from this change for now as while it would fit with the same reasoning it much heavier entangled with the previous CacheSetHelper change, so moving it now would mean breaking the API. The PCI change is worthwhile on its own though as it is used by VCI. Closes: 686221
* rework cachesets API to allow future extensionDavid Kalnischkies2014-09-271-76/+288
| | | | | | | | | | | | | | | The introduction of Fnmatch showed that each new selector would require multiple new virtual methods in the CacheSetHelper to work correctly, which isn't that great. We now flip to a single virtual method which handles all cases separated by an enum – as new enum values can be added without an ABI break. Great care was taken to make old code work with the new way of organisation, which means in return that you might be bombarded with deprecation warnings now if you don't adapt, but code should still compile and work as before as can be seen in apt itself with this commit. Git-Dch: Ignore
* add APT::PackageUniverse as a pkgCache wrapperDavid Kalnischkies2014-09-271-0/+38
| | | | Git-Dch: Ignore
* add specialisations for std::vectorDavid Kalnischkies2014-09-271-2/+73
| | | | Git-Dch: Ignore
* remove the Section member from package structDavid Kalnischkies2014-06-181-1/+10
| | | | | | | | | | | | | | | | | | A version belongs to a section and has hence a section member of its own. A package on the other hand can have multiple versions from different sections. This was "solved" by using the section which was parsed first as order of sources.list defines, but that is obviously a horribly unpredictable thing. We therefore directly remove this struct member to free some space and mark the access method as deprecated, which is told to return the section of the 'newest' known version, which is at least predictable, but possible not what it returned before – but nobody knows. Users are way better of with the Section() as returned by the version they are dealing with. It is likely the same for all versions of a package, but in the few cases it isn't, it is important (like packages moving from main/* to contrib/* or into oldlibs …).
* Fix more warnings from clangMichael Vogt2014-05-291-1/+1
| | | | | | | | | Reported-By: clang++ -Werror Conflicts: apt-pkg/acquire-item.cc apt-pkg/acquire-item.h apt-pkg/deb/debmetaindex.h
* cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-131-1/+6
| | | | | | | | 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: extra ‘;’ [-Wpedantic]David Kalnischkies2014-03-131-88/+88
| | | | | Git-Dch: Ignore Reported-By: gcc -Wpedantic
* make doxygen more quiet, fix issues and disable latexDavid Kalnischkies2014-03-131-2/+5
| | | | Git-Dch: Ignore
* add missing canNotFindFnmatch/showFnmatchSelection (for the next ABI break)Michael Vogt2014-02-141-0/+6
|
* squash merge of the feature/apt-binary branch without the changes from ↵Michael Vogt2013-08-121-1/+12
| | | | experimental
* remove double list includeMichael Vogt2013-07-231-1/+0
|
* * apt-pkg/cacheset.cc:David Kalnischkies2012-06-141-0/+1
| | | | - add PackageContainerInterface::FromGroup to support architecture specifications with wildcards on the commandline
* newer gcc versions seems to have no problem with that, but while workingDavid Kalnischkies2012-04-171-2/+2
| | | | with g++-4.1 it complains about this so lets be extra clear
* correctly ignore already (un)hold packagesDavid Kalnischkies2012-02-111-0/+8
|
* revert 2184.1.3: forward declaration instead of headersDavid Kalnischkies2011-12-131-0/+4
| | | | | The breakage is just to big for now, so guard the change with #ifndef APT_8_CLEANER_HEADERS and be nice to library users
* fix the operator++ implementations in the cachesetsDavid Kalnischkies2011-11-221-4/+8
|
* - provide a {Package,Version}List similar to {Package,Version}SetDavid Kalnischkies2011-11-111-11/+99
| | | | | * cmdline/apt-{get,cache,mark}.cc: - use Lists instead of Sets if input order should be preserved for commands accepting lists of packages, e.g. policy (Closes: #625960)
* * apt-pkg/cacheset.cc:David Kalnischkies2011-11-091-180/+344
| | | | - make the cachesets real containers which can embedding any container to be able to use the same interface regardless of set or list usage
* use forward declaration in headers if possible instead of includesDavid Kalnischkies2011-09-191-5/+8
|
* remove deprecated methods which nobody should have used anyway likeDavid Kalnischkies2011-05-171-2/+0
| | | | pseudo-package related and/or private
* remove the extra unnecessary qualification cppcheck complains aboutDavid Kalnischkies2011-04-161-13/+13
|
* Remove the "pseudopackage" handling of Architecture: all packages forDavid Kalnischkies2011-03-081-2/+2
| | | | | | | | | Multi-Arch; instead, Arch: all packages only satisfy dependencies for the native arch, except where the Arch: all package is declared Multi-Arch: foreign. (Closes: #613584) This has the sideeffect that arch:all packages internally show up as coming from the native arch - so packages with the architecture "all" doesn't exist any longer in the pkgcache
* - [ABI BREAK] add an ErrorType option to CacheSetHelperDavid Kalnischkies2010-07-301-1/+15
| | | | | * cmdline/apt-cache.cc: - use Notice instead of Error in the CacheSetHelper messages for compat reasons. Otherwise tools like sbuild blow up
* * apt-pkg/cacheset.cc:David Kalnischkies2010-07-171-0/+375
| | | - move them back to the library as they look stable now
* * cmdline/cacheset.cc:David Kalnischkies2010-06-151-274/+0
| | | - doesn't include it in the library for now as it is too volatile
* Add a GroupedFromCommandLine for the VersionSet similar to theDavid Kalnischkies2010-06-151-0/+35
| | | | | one for PackageSet and refactor the existing VersionSet methods to simplify that.
* remove the "typename" from the const_iterators as gcc-4.4 doesn't likeDavid Kalnischkies2010-06-091-2/+2
| | | | them and gcc-4.5 does the right thing (TM) with and without them
* add a GroupedFromCommandLine method to the PackageSet to split theDavid Kalnischkies2010-06-061-0/+23
| | | | packages on the commandline into groups based on modifiers
* support special release-modifier 'installed' and 'candidate'David Kalnischkies2010-06-051-0/+5
|
* handle :arch modifier in PackageSet::FromString correctlyDavid Kalnischkies2010-06-051-2/+2
|
* do not insert end() Iterators into the CacheSet even if requestedDavid Kalnischkies2010-06-051-0/+6
|
* Add a method to get a VersionSet from the Commandline and refactorDavid Kalnischkies2010-06-051-4/+70
| | | | the existing methods a bit to reuse them easier intern