summaryrefslogtreecommitdiff
path: root/apt-pkg/cacheiterators.h
Commit message (Collapse)AuthorAgeFilesLines
* store source name and version in binary cacheDavid Kalnischkies2014-09-271-0/+6
| | | | | | | Accessing the package records to acquire this information is pretty costly, so that information wasn't used so far in many places. The most noticeable user by far is EDSP at the moment, but there are ideas to change that which this commit tries to enable.
* deprecate Pkg->Name in favor of Grp->NameDavid Kalnischkies2014-09-271-2/+2
| | | | | | | 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.
* remove the Section member from package structDavid Kalnischkies2014-06-181-1/+5
| | | | | | | | | | | | | | | | | | 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 …).
* follow method attribute suggestions by gccDavid Kalnischkies2014-03-131-17/+18
| | | | | Git-Dch: Ignore Reported-By: gcc -Wsuggest-attribute={pure,const,noreturn}
* cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-131-0/+4
| | | | | | | | 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: cast from type A to type B casts away qualifiers [-Wcast-qual]David Kalnischkies2014-03-131-1/+1
| | | | | Git-Dch: Ignore Reported-By: gcc -Wcast-qual
* warning: extra ‘;’ [-Wpedantic]David Kalnischkies2014-03-131-113/+113
| | | | | Git-Dch: Ignore Reported-By: gcc -Wpedantic
* Fix typos in documentation (codespell)Michael Vogt2014-02-221-3/+3
|
* Version 3 for DPkg::Pre-Install-Pkgs with MultiArch infoDavid Kalnischkies2013-07-111-0/+1
| | | | | | | | | | | | | | | | | | | | | 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
* * apt-pkg/cacheiterators.h:David Kalnischkies2013-04-031-0/+2
| | | - provide DepIterator::IsSatisfied as a nicer shorthand for DepCheck
* * apt-pkg/cacheiterators.h:David Kalnischkies2012-06-111-1/+3
| | | - add an IsMultiArchImplicit() method for Dep- and PrvIterator
* * apt-pkg/cacheiterators.h:David Kalnischkies2012-01-191-1/+1
| | | | | | | | | - 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)
* factor out the detection of self-conflicts into Dep::IsIgnorableDavid Kalnischkies2012-01-131-0/+2
|
* use forward declaration in headers if possible instead of includesDavid Kalnischkies2011-09-191-0/+1
|
* do not pollute namespace in the headers with using (Closes: #500198)David Kalnischkies2011-09-191-3/+3
|
* remove deprecated methods which nobody should have used anyway likeDavid Kalnischkies2011-05-171-4/+0
| | | | pseudo-package related and/or private
* * apt-pkg/pkgcache.h:David Kalnischkies2011-05-171-3/+1
| | | | - clean up mess with the "all" handling in MultiArch to fix LP: #733741 cleanly for everyone now
* if critical or-group can't be satisfied, exit directly.David Kalnischkies2011-05-111-0/+1
|
* * apt-pkg/cacheiterator.h:David Kalnischkies2011-03-251-0/+4
| | | | | | - 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
* Remove the "pseudopackage" handling of Architecture: all packages forDavid Kalnischkies2011-03-081-6/+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
* * apt-pkg/cacheiterator.h:David Kalnischkies2011-01-131-9/+9
| | | - do not segfault if cache is not build (Closes: #254770)
* * apt-pkg/algorithms.cc:David Kalnischkies2010-08-101-0/+3
| | | | - change the debug outputs to display also arch of the package and version dependencies information
* * apt-pkg/pkgcache.cc:David Kalnischkies2010-07-251-2/+5
| | | - prefer non-virtual packages in FindPreferredPkg
* rename ReOwn to ReMap in the cacheiteratorsDavid Kalnischkies2010-07-111-2/+2
|
* * apt-pkg/pkgcachegen.{cc,h}:David Kalnischkies2010-07-081-0/+6
| | | | - make the used MMap moveable (and therefore dynamic resizeable) by applying (some) mad pointer magic (Closes: #195018)
* * apt-pkg/policy.h:David Kalnischkies2010-07-041-16/+16
| | | | - add another round of const& madness as the previous round accidently NOT override the virtual GetCandidateVer() method (Closes: #587725)
* add a simple method to VerIterator to check if two Versions are similarDavid Kalnischkies2010-06-161-0/+9
|
* * apt-pkg/cacheset.{cc,h}:David Kalnischkies2010-05-311-2/+2
| | | - add simple wrapper around std::set for cache structures
* * apt-pkg/pkgcache.cc:David Kalnischkies2010-05-311-0/+5
| | | - get the best matching arch package from a group with FindPreferredPkg
* move regex magic from apt-get to new FromRegEx methodDavid Kalnischkies2010-05-301-1/+1
|
* * apt-pkg/cacheiterator.h:David Kalnischkies2010-05-291-1/+3
| | | - let pkgCache::Iterator inherent std::iterator
* add a missing non-const & Accessors to the Iterator classDavid Kalnischkies2010-03-191-0/+1
|
* Fix the PkgFileIterator Constructor which defaults to the wrong value.David Kalnischkies2010-02-281-1/+2
| | | | | | (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)
* move ShowPkg() from apt-get to the PkgIterator and rename it to FullName()David Kalnischkies2010-02-261-0/+1
| | | | | | | 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.
* Add yet another pseudo package which isn't as pseudo as the others:David Kalnischkies2010-02-121-0/+1
| | | | | | | | | | 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.
* Arch() on a MultiArch:all version should return "all" to be compatibleDavid Kalnischkies2010-02-111-1/+10
| | | | | with previous usecases. You now need to requested with Arch(true) the return of the architecture this version (and pseudo package) was created for.
* Drop the Arch information from the Version structure as we can getDavid Kalnischkies2010-02-071-1/+1
| | | | the information from the parent package now
* Split ListParser::NewDepends into two methods to use these new methodDavid Kalnischkies2009-12-271-3/+11
| | | | | | | | | 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.
* Implement the first step toward Multi-Arch by setting up a GroupDavid Kalnischkies2009-12-191-3/+34
| | | | | | | | | | | | 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!
* Refactor the cache iterators by using a common base classDavid Kalnischkies2009-12-091-379/+294
| | | | | This should not change the public interface, but it removes the friend connection between the iterators and pkgcache as it is unused.
* The 'not dead yet' releaseMichael Vogt2009-07-211-18/+18
|\ | | | | | | | | | | | | | | | | | | | | * 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)
| * add the various foldmarkers in apt-pkg & cmdline (no code change)David Kalnischkies2009-06-301-18/+18
| |
* | * apt-pkg/acquire.cc:Michael Vogt2009-07-211-5/+5
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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)
| * * apt-pkg/cacheiterators.h:Michael Vogt2008-09-221-5/+5
| | | | | | - add missing checks for Owner == 0 in end()
* | * add depth information to the debug output and show what dependsMichael Vogt2009-06-291-2/+11
| | | | | | | | | | type triggers a autoinst (closes: #458389) * add debug::pkgDepCache::Marker with more detailed debug output (closes: #87520)
* | [apt-pkg] allow also codenames for specifying a releaseDavid Kalnischkies2009-05-071-0/+1
|/ | | | | * 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
* * merged the no-pragma branchMichael Vogt2006-12-141-3/+0
|\
| * * removed the pragma messMichael Vogt2006-10-021-3/+0
| |
* | * merged with apt--mvoMichael Vogt2005-11-301-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * * merge fix for #339533Michael Vogt2005-11-211-1/+1
| |