summaryrefslogtreecommitdiff
path: root/apt-pkg/cacheiterators.h
AgeCommit message (Collapse)Author
2014-09-27deprecate Pkg->Name in favor of Grp->NameDavid Kalnischkies
They both store the same information, so this field just takes up space in the Package struct for no good reason. We mark it "just" as deprecated instead of instantly removing it though as it isn't misleading like Section was and is potentially used in the wild more often.
2014-06-18remove the Section member from package structDavid Kalnischkies
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 …).
2014-03-13follow method attribute suggestions by gccDavid Kalnischkies
Git-Dch: Ignore Reported-By: gcc -Wsuggest-attribute={pure,const,noreturn}
2014-03-13cleanup headers and especially #includes everywhereDavid Kalnischkies
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)
2014-03-13warning: cast from type A to type B casts away qualifiers [-Wcast-qual]David Kalnischkies
Git-Dch: Ignore Reported-By: gcc -Wcast-qual
2014-03-13warning: extra ‘;’ [-Wpedantic]David Kalnischkies
Git-Dch: Ignore Reported-By: gcc -Wpedantic
2014-02-22Fix typos in documentation (codespell)Michael Vogt
2013-07-11Version 3 for DPkg::Pre-Install-Pkgs with MultiArch infoDavid Kalnischkies
Adds on top of Version 2 to all displayed version numbers the architecture as well as the MultiArch flag for consumption by the hooks. Most of the time the architecture will be the same for both versions displayed, but packages might change from "all" to "any" (or back) between versions so we can't display the architecture for packages. Pseudo-Format for Version 3: <name> <version> <arch> <m-a-flag> <compare> <version> <arch> <m-a-flag> Examples: stuff - - none < 1 amd64 none **CONFIGURE** libsame 1 i386 same < 2 i386 same **CONFIGURE** stuff 2 i386 none > 1 i386 none **CONFIGURE** libsame 2 i386 same > - - none **REMOVE** toolkit 1 all foreign > - - none **REMOVE** Closes: #712116
2013-04-03* apt-pkg/cacheiterators.h:David Kalnischkies
- provide DepIterator::IsSatisfied as a nicer shorthand for DepCheck
2012-06-11* apt-pkg/cacheiterators.h:David Kalnischkies
- add an IsMultiArchImplicit() method for Dep- and PrvIterator
2012-01-19* apt-pkg/cacheiterators.h:David Kalnischkies
- return the correct version arch for all+foreign, too The flag is interpreted at a few other places in different styles so this commit ensures that the flag check is consistent everywhere (checking for Same in flag style is a bit too much as it isn't used in combination with others anyway, but who knows and just for consistency)
2012-01-13factor out the detection of self-conflicts into Dep::IsIgnorableDavid Kalnischkies
2011-09-19use forward declaration in headers if possible instead of includesDavid Kalnischkies
2011-09-19do not pollute namespace in the headers with using (Closes: #500198)David Kalnischkies
2011-05-17remove deprecated methods which nobody should have used anyway likeDavid Kalnischkies
pseudo-package related and/or private
2011-05-17* apt-pkg/pkgcache.h:David Kalnischkies
- clean up mess with the "all" handling in MultiArch to fix LP: #733741 cleanly for everyone now
2011-05-11if critical or-group can't be satisfied, exit directly.David Kalnischkies
2011-03-25* apt-pkg/cacheiterator.h:David Kalnischkies
- return "all" instead of native architecture without breaking the abi (too much) by extending enum instead of using bitflags (LP: #733741) With the next abi break that enum should be a char bitflag instead
2011-03-08Remove the "pseudopackage" handling of Architecture: all packages forDavid Kalnischkies
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
2011-01-13* apt-pkg/cacheiterator.h:David Kalnischkies
- do not segfault if cache is not build (Closes: #254770)
2010-08-10* apt-pkg/algorithms.cc:David Kalnischkies
- change the debug outputs to display also arch of the package and version dependencies information
2010-07-25* apt-pkg/pkgcache.cc:David Kalnischkies
- prefer non-virtual packages in FindPreferredPkg
2010-07-11rename ReOwn to ReMap in the cacheiteratorsDavid Kalnischkies
2010-07-08* apt-pkg/pkgcachegen.{cc,h}:David Kalnischkies
- make the used MMap moveable (and therefore dynamic resizeable) by applying (some) mad pointer magic (Closes: #195018)
2010-07-04* apt-pkg/policy.h:David Kalnischkies
- add another round of const& madness as the previous round accidently NOT override the virtual GetCandidateVer() method (Closes: #587725)
2010-06-16add a simple method to VerIterator to check if two Versions are similarDavid Kalnischkies
2010-05-31* apt-pkg/cacheset.{cc,h}:David Kalnischkies
- add simple wrapper around std::set for cache structures
2010-05-31* apt-pkg/pkgcache.cc:David Kalnischkies
- get the best matching arch package from a group with FindPreferredPkg
2010-05-30move regex magic from apt-get to new FromRegEx methodDavid Kalnischkies
2010-05-29* apt-pkg/cacheiterator.h:David Kalnischkies
- let pkgCache::Iterator inherent std::iterator
2010-03-19add a missing non-const & Accessors to the Iterator classDavid Kalnischkies
2010-02-28Fix the PkgFileIterator Constructor which defaults to the wrong value.David Kalnischkies
(0 instead of the HeaderP) This breaks the Cache Validation functionality as the end() doesn't test for NULL. (The fault was introduced with the rewriting of the CacheIterators)
2010-02-26move ShowPkg() from apt-get to the PkgIterator and rename it to FullName()David Kalnischkies
responseable for displaying a package name and the architecture in a uniform way. Pretty option can be used to not append the architecture if it is the native architecture or all - and use it all over the place in the commandline tools.
2010-02-12Add yet another pseudo package which isn't as pseudo as the others:David Kalnischkies
Arch all packages are now represented by arch depending packages which all depend on a package with the same name and the special arch "all". This packages has NO dependencies, but beside this the same information. It is the only package which has a size, the arch depending ones all have a zero size. While the arch depending pseudo packages are used for dependency resolution the arch "all" package is used for downloading and ordering of the package.
2010-02-11Arch() on a MultiArch:all version should return "all" to be compatibleDavid Kalnischkies
with previous usecases. You now need to requested with Arch(true) the return of the architecture this version (and pseudo package) was created for.
2010-02-07Drop the Arch information from the Version structure as we can getDavid Kalnischkies
the information from the parent package now
2009-12-27Split ListParser::NewDepends into two methods to use these new methodDavid Kalnischkies
for creating the dependencies needed for our groups: For now for all groups only one package can be installed at the same time which conflicts with each other packages in the group. The exceptions are architecture all package. Also, the Multi-Arch field is now parsed, but not used for now.
2009-12-19Implement the first step toward Multi-Arch by setting up a GroupDavid Kalnischkies
infrastructor for packages. APT is now aware of the fact that a package A in architecture X can't satisfy a dependency on package A in architecture Y - to handle these packages are now identified by name and architecture, so different architectures of the same package are handled internally as completly different packages. This is great for pinning, dependency checking and in many other situations, but sometimes we need to know which archs are available for a given package: Here Groups come to our rescue!
2009-12-09Refactor the cache iterators by using a common base classDavid Kalnischkies
This should not change the public interface, but it removes the friend connection between the iterators and pkgcache as it is unused.
2009-07-21The 'not dead yet' releaseMichael Vogt
* add hook for MarkInstall and MarkDelete (closes: #470035) * add the various foldmarkers in apt-pkg & cmdline (no code change) * versions with a pin of -1 shouldn't be a candidate (Closes: #355237) * prefer mmap as memory allocator in MMap instead of a static char array which can (at least in theory) grow dynamic * eliminate (hopefully all) segfaults in pkgcachegen.cc and mmap.cc which can arise if cache doesn't fit into the mmap (Closes: #535218) * display warnings instead of errors if the parts dirs doesn't exist * honor the dpkg hold state in new Marker hooks (closes: #64141)
2009-07-21* apt-pkg/acquire.cc:Michael Vogt
- make the max pipeline depth of the acquire queue configurable via Acquire::Max-Pipeline-Depth * apt-pkg/deb/dpkgpm.cc: - add Dpkg::UseIoNice boolean option to run dpkg with ionice -c3 (off by default) - send "dpkg-exec" message on the status fd when dpkg is run - provide DPkg::Chroot-Directory config option (useful for testing) - fix potential hang when in a backgroud process group * apt-pkg/algorithms.cc: - consider recommends when making the scores for the problem resolver * apt-pkg/acquire-worker.cc: - show error details of failed methods * apt-pkg/contrib/fileutl.cc: - if a process aborts with signal, show signal number * methods/http.cc: - ignore SIGPIPE, we deal with EPIPE from write in HttpMethod::ServerDie() (LP: #385144) * apt-pkg/indexcopy.cc: - support having CDs with no Packages file (just a Packages.gz) by not forcing a verification on non-existing files (LP: #255545) - remove the gettext from a string that consists entirely of variables (LP: #56792) * apt-pkg/cacheiterators.h: - add missing checks for Owner == 0 in end() * apt-pkg/indexrecords.cc: - fix some i18n issues * apt-pkg/contrib/strutl.h: - add new strprintf() function to make i18n strings easier - fix compiler warning * apt-pkg/deb/debsystem.cc: - make strings i18n able * fix problematic use of tolower() when calculating the version hash by using locale independant tolower_ascii() function. Thanks to M. Vefa Bicakci (LP: #80248) * build fixes for g++-4.4 * cmdline/apt-mark: - add "showauto" option to show automatically installed packages * document --install-recommends and --no-install-recommends (thanks to Dereck Wonnacott, LP: #126180) * Updated cron script to support backups by hardlinks and verbose levels. All features turned off by default. * Added more error handlings. Closes: #438803, #462734, #454989, * Refactored condition structure to make download and upgrade performed if only previous steps succeeded. Closes: #341970 * Documented all cron script related configuration items in configure-index. * apt-ftparchive might write corrupt Release files (LP: #46439) * Apply --important option to apt-cache depends (LP: #16947)
2009-06-30add the various foldmarkers in apt-pkg & cmdline (no code change)David Kalnischkies
2009-06-29* add depth information to the debug output and show what dependsMichael Vogt
type triggers a autoinst (closes: #458389) * add debug::pkgDepCache::Marker with more detailed debug output (closes: #87520)
2009-05-07[apt-pkg] allow also codenames for specifying a releaseDavid Kalnischkies
* MatchType::Release checks first for archive than for codename equality * new n= option in apt_preference to be able to pin based on a codeName
2008-09-22* apt-pkg/cacheiterators.h:Michael Vogt
- add missing checks for Owner == 0 in end()
2006-12-14* merged the no-pragma branchMichael Vogt
2006-10-02* removed the pragma messMichael Vogt
2005-11-30* merged with apt--mvoMichael Vogt
Patches applied: * apt@packages.debian.org/apt--sources-list-d--0--base-0 tag of apt@packages.debian.org/apt--main--0--patch-30 * apt@packages.debian.org/apt--sources-list-d--0--patch-1 Patch from apt-rpm via Michael Vogt to implement /etc/apt/sources.list.d * bubulle@debian.org--2005/apt--main--0--patch-130 Galician translation completed * bubulle@debian.org--2005/apt--main--0--patch-131 Simplified Chinese translation update * bubulle@debian.org--2005/apt--main--0--patch-132 Completed Simplified Chinese translation * bubulle@debian.org--2005/apt--main--0--patch-133 Merge with Michael AND update PO files * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-90 * merged the sources.list.d patch * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-91 * merged with bubulle * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-92 * changelog update * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-93 * sources.list.d documented * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-94 * pkgDirStream has (slightly) better extract support now * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-95 * merge fix for #339533 * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-96 * merged with bubulle * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-97 * some more debug output * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-98 * ABI change: merged more flexible pkgAcquireFile code * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-99 * merged http download limit for apt (#146877) * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-100 * applied parts of the string speedup patch from debian #319377 (ABI change) * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-101 * fix for #340448 * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-102 * finalized this release * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-103 * changelog updates * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-104 * build-depend on libdb4.3 now, fix for kFreeBSD (#317718) * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-105 * fix mailaddress * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-106 * fix a string (thanks to bubulle) * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-107 * merged with bubulle
2005-11-21* merge fix for #339533Michael Vogt
2005-10-21* ABI/API change: add "VerIterator::TranslatedDescription()" method to make ↵Michael Vogt
the life of the api user easier