summaryrefslogtreecommitdiff
path: root/apt-pkg/cacheiterators.h
AgeCommit message (Collapse)Author
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
2005-09-27* merged with apt--mvoMichael Vogt
Patches applied: * bubulle@debian.org--2005/apt--main--0--patch-96 Sync with Matt * bubulle@debian.org--2005/apt--main--0--patch-97 Merge with Matt * bubulle@debian.org--2005/apt--main--0--patch-98 Update PO files with the POT * bubulle@debian.org--2005/apt--main--0--patch-99 Added Galician translation * bubulle@debian.org--2005/apt--main--0--patch-100 Completed Danish translation * bubulle@debian.org--2005/apt--main--0--patch-101 Merge with Matt * bubulle@debian.org--2005/apt--main--0--patch-102 Merge with Michael Vogt's archive * bubulle@debian.org--2005/apt--main--0--patch-103 Update the POT files and all PO files to resync with recent code * bubulle@debian.org--2005/apt--main--0--patch-104 French translation completed * michael.vogt@ubuntu.com--2005/apt--bts225947--0--base-0 tag of apt@packages.debian.org/apt--main--0--patch-79 * michael.vogt@ubuntu.com--2005/apt--bts225947--0--patch-1 * merged with mainline and apt--fixes--0 * michael.vogt@ubuntu.com--2005/apt--bts225947--0--patch-2 * patch from aj (slighly modified to use auto_ptr<>) applied * michael.vogt@ubuntu.com--2005/apt--bts225947--0--patch-3 * changelog updated * michael.vogt@ubuntu.com--2005/apt--bts225947--0--patch-4 * work for arch=all packages too now * michael.vogt@ubuntu.com--2005/apt--bts225947--0--patch-5 * merged with apt--main--0 * michael.vogt@ubuntu.com--2005/apt--bts225947--0--patch-6 * fixed a incorrect po/he.po merge * michael.vogt@ubuntu.com--2005/apt--cdrom-fallback--0--base-0 tag of apt@packages.debian.org/apt--main--0--patch-110 * michael.vogt@ubuntu.com--2005/apt--cdrom-fallback--0--patch-1 * initial patch to make falling back from cdrom possible * michael.vogt@ubuntu.com--2005/apt--cdrom-fallback--0--patch-2 * fix in methods/cdrom.cc: don't call Fail() but return false so that apt can fallback to a differencent source * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-7 * fixed incorrect man-page example * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-8 * changelog udpate * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-9 * we only need to check once for xmlto * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-10 * fix a bug in a man-page, fix a problem with overly long lines in apt-cdrom * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-11 * merged with apt--main--0 * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-12 * fix a incorrect error message (it always added .gz regardless what was downloaded) * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-13 * merged with main * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-14 * added Hashsum support for file and cdrom * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-15 * added README.arch * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-16 * merged with main * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-17 * move the changelog to the right place * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-18 * Change pkgPolicy::Pin from private to protected * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-19 * added a default constructor for PrvIterator * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-20 * applied otavios patch to reread the statusFile on debSystem::Initialize * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-33 * merged with matt's tree * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-34 * merged with matts tree * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-35 * build debian and ubuntu package from the same source * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-36 * added debian/patches dir * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-37 * fix the breakage from my last commit (note to self: always, _always_ run baz diff before a commit) * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-38 * removed the lsb_release build patch (nobody except me seems to like it) * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-39 * merged from main * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-40 * merged the apt--sane-handle-timeout--0 branch * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-41 * merged apt--bts225947--0 * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-42 * merged with apt--main * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-43 * added patch that adds a apt-secure man-page (thanks to jfs@computer.org) * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-44 * added author credits * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-45 * added apt-ftparchive.conf example * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-46 * corrected the utf8 of javier fernandes pena * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-47 * improve the timeout handling (again) * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-48 * merged with apt--fixes--0 * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-49 * README.arch updates, comment in apt-pkg/algorithm.h added, apt-pkg/cacheiterators.h order in initlist changed to remove warning * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-50 * meda-change message is send over status-fd now * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-51 * include a human readable string for the MediaChange status-fd message as well * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-52 * finalizing changelog * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-53 * check ctime as well in cron.daily when cleaning up packages in apt.cron.daily * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-54 * fix a stupid typo in apt.cron.daily * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-55 * fix apt-pkg/cdrom.cc to umount the cdrom again if anything fails * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-56 * merged from apt--cdrom-fallback--0 * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-57 * changelog update * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-58 * better error string for a failed dpkg-source * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-59 * make sure that the pkgRecords D'tor does not segfault * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-60 * merged updated french man-page * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-61 * merged with bubulle * michael.vogt@ubuntu.com--2005/apt--sane-handle-timeout--0--base-0 tag of apt@packages.debian.org/apt--main--0--patch-87 * michael.vogt@ubuntu.com--2005/apt--sane-handle-timeout--0--patch-1 * report timeouts (from Connect) and fail if they happen in pkgAcqMetaSig * michael.vogt@ubuntu.com--2005/apt--sane-handle-timeout--0--patch-2 * merged with the fixes branch to make it build again * michael.vogt@ubuntu.com--2005/apt--sane-handle-timeout--0--patch-3 * merged with main * otavio@debian.org--2005/apt--fixes--0--patch-28 Reread status configuration, needed for clients using independent apt ... * philippe.batailler@free.fr--2005/VOGTapt--mvo--0--patch-1 French L10N update * philippe.batailler@free.fr--2005/VOGTapt--mvo--0--patch-2 Generate correctly french manpages