summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcache.cc
AgeCommit message (Collapse)AuthorFilesLines
2015-04-22remove "first package seen is native package" assumptionDavid Kalnischkies1-13/+1
The fix for #777760 causes packages of foreign (and the native) architectures, to be created correctly, but invalidates (like the previously existing, but policy-forbidden architecture-less packages we had to support for some upgrade scenarios) the assumption that the first (and only) package in the cache for a single architecture system must be the package for the native architecture (as, where should the other architectures come from, right? Wrong.). Depending on the order of parsing sources more or less packages can be effected by this. The effects are strange (for apt it mostly effects simulation/debug output, but also apt-mark on these specific packages), which complicates debugging, but relatively harmless if understood as most actions do not need direct named access to packages. The problem is fixed by removing the single-arch special casing in the paths who had them (Cache.FindPkg), so they use the same code as multi-arch systems, which use them as a wrapper for Grp.FindPkg. Note that single-arch system code was using Grp.FindPkg before as well if a Grp structure was handily available, so we don't introduce new untested code here: We remove more brittle special cases which are less tested instead (this was planed to be done for Stretch anyhow). Note further that the method with the assumption itself isn't fixed. As it is a private method I opted for declaring it deprecated instead and remove all its call positions. As it is private no-one can call this method legally (thanks to how c++ works by default its still an exported symbol through) and fixing it basically means reimplementing code we already have in Grp.FindPkg. Removing rather than fixing seems hence like a good solution. Closes: 782777 Thanks: Axel Beckert for testing
2014-11-10deprecate the Section member from package structDavid Kalnischkies1-1/+4
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. 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 …). Backport of 7a66977 which actually instantly removes the member.
2014-05-22mark as Automatic/Downloadable pure as gcc suggestsDavid Kalnischkies1-2/+2
Git-Dch: Ignore Reported-By: gcc
2014-03-13abstract version hash comparison a bitDavid Kalnischkies1-0/+4
In #737085 we see that apt can be confused if informations about versions only differ slightly. This commit adds a way of at least adding a few more data points with the next abi break to help a bit with it. Git-Dch: Ignore
2014-03-13cleanup headers and especially #includes everywhereDavid Kalnischkies1-2/+5
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: unused parameter ‘foo’ [-Wunused-parameter]David Kalnischkies1-1/+1
Reported-By: gcc -Wunused-parameter Git-Dch: Ignore
2014-03-13warning: extra ‘;’ [-Wpedantic]David Kalnischkies1-10/+10
Git-Dch: Ignore Reported-By: gcc -Wpedantic
2014-02-22Fix typos in documentation (codespell)Michael Vogt1-2/+2
2013-07-11Version 3 for DPkg::Pre-Install-Pkgs with MultiArch infoDavid Kalnischkies1-0/+12
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 Kalnischkies1-4/+12
- provide DepIterator::IsSatisfied as a nicer shorthand for DepCheck
2013-04-03 - sort group and package names in the hashtable on insertDavid Kalnischkies1-11/+20
* apt-pkg/pkgcache.cc: - assume sorted hashtable entries for groups/packages
2013-03-10various simple changes to fix cppcheck warningsDavid Kalnischkies1-9/+9
2012-09-19* apt-pkg/pkgcache.cc:David Kalnischkies1-2/+23
- ignore negative dependencies applying in the same group for M-A:same packages on the real package name as self-conflicts
2012-09-09handle packages without a mandatory architecture (debian-policy §5.3)David Kalnischkies1-1/+5
by introducing a pseudo-architecture 'none' so that the small group of users with these packages can get right of them without introducing too much hassle for other users (Closes: #686346)
2012-06-14* apt-pkg/pkgcache.cc:David Kalnischkies1-1/+1
- do a string comparision for architecture checking in IsMultiArchImplicit as 'unique' strings in the pkgcache aren't unique (Closes: #677454)
2012-06-11* apt-pkg/deb/deblistparser.cc:Thibaut Girka1-1/+4
- add support for arch-specific qualifiers in dependencies
2012-06-11* apt-pkg/cacheiterators.h:David Kalnischkies1-0/+26
- add an IsMultiArchImplicit() method for Dep- and PrvIterator
2012-01-13factor out the detection of self-conflicts into Dep::IsIgnorableDavid Kalnischkies1-15/+34
2012-01-13* apt-pkg/pkgcache.cc:David Kalnischkies1-5/+12
- ignore implicit conflicts on providers in AllTarget, too
2011-10-12* apt-pkg/pkgcache.cc:David Kalnischkies1-3/+14
- always prefer "en" over "" for "en"-language regardless of cache-order
2011-09-19do not pollute namespace in the headers with using (Closes: #500198)David Kalnischkies1-2/+2
2011-09-13merge with debian/sidDavid Kalnischkies1-1/+1
2011-09-13merge with debian/experimentalDavid Kalnischkies1-13/+18
2011-09-13reorder includes: add <config.h> if needed and include it at firstDavid Kalnischkies1-3/+4
2011-08-17* apt-pkg/packagemanager.cc, apt-pkg/pkgcache.cc:David Kalnischkies1-1/+1
- ignore "self"-conflicts for all architectures of a package instead of just for the architecture of the package locked at in the ordering of installations too (Closes: #802901)
2011-08-15merged from the debian-sid branchMichael Vogt1-13/+13
2011-08-11cppcheck complains about some possible speed improvements which could beDavid Kalnischkies1-13/+13
done on the mirco-optimazation level, so lets fix them: (performance) Possible inefficient checking for emptiness. (performance) Prefer prefix ++/-- operators for non-primitive types.
2011-07-20* apt-pkg/pkgcache.cc:Julian Andres Klode1-0/+3
- Check that cache is at least CacheFileSize bytes large (LP: #16467)
2011-07-20apt-pkg/pkgcache.h: Add pkgCache::Header::CacheFileSize, storing the cache sizeJulian Andres Klode1-0/+2
2011-05-17remove deprecated methods which nobody should have used anyway likeDavid Kalnischkies1-3/+0
pseudo-package related and/or private
2011-05-11convert a lot of places to use IsNegative instead of checking by handDavid Kalnischkies1-9/+3
for the three different dependencies
2011-05-11if critical or-group can't be satisfied, exit directly.David Kalnischkies1-0/+11
2011-04-25* apt-pkg/pkgcache.cc:David Kalnischkies1-3/+6
- really ignore :arch in FindPkg() in non-multiarch environment
2011-04-06* apt-pkg/pkgcache.cc:David Kalnischkies1-5/+6
- use the native Architecture stored in the cache header instead of loading it from configuration as suggested by Julian Andres Klode
2011-04-06document the pkg:any specialcasing in FindPkg as well to make it clearDavid Kalnischkies1-0/+3
that it is a needed "hack" to support multi-arch in the least breaking way
2011-03-28* apt-pkg/deb/deblistparser.cc:David Kalnischkies1-5/+5
- create foo:any provides for all architectures for an allowed package
2011-03-25* apt-pkg/pkgcachegen.cc:David Kalnischkies1-1/+1
- make "all"->"native" an implementation detail of NewPackage rather than rewrite it in higher methods
2011-03-08Remove the "pseudopackage" handling of Architecture: all packages forDavid Kalnischkies1-16/+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
2010-10-26* apt-pkg/pkgcache.cc:David Kalnischkies1-7/+8
- fallback always to a suitable description (Closes: #601016)
2010-09-14* apt-pkg/policy.cc:David Kalnischkies1-0/+1
- support 100-pinning in Release file with ButAutomaticUpgrades as requested by the backports crew (Closes: #596097) * apt-pkg/deb/deblistparser.cc: - overrule NotAutomatic in case of ButAutomaticUpgrades
2010-08-13* apt-pkg/pkgcache.cc:David Kalnischkies1-1/+2
- fix LongDesc handling in LANG=C environment
2010-08-10merge with debian-experimental-maDavid Kalnischkies1-1/+4
* Swedish translation update. Closes: #592366 * apt-pkg/pkgcache.cc: - re-evaluate the architectures cache when the cache is (re)opened * apt-pkg/cdrom.cc: - fix off-by-one error in DropBinaryArch * apt-pkg/contrib/fileutl.cc: - Add WriteAtomic mode. - Revert WriteEmpty to old behavior (LP: #613211) * apt-pkg, methods: - Convert users of WriteEmpty to WriteAtomic. * apt-pkg/depcache.cc: - Only try upgrade for Breaks if there is a newer version, otherwise handle it as Conflicts (by removing it) (helps for #591882). * debian/control: - Add dependency on gnupg to apt, apt-key uses it.
2010-08-10* apt-pkg/algorithms.cc:David Kalnischkies1-0/+24
- change the debug outputs to display also arch of the package and version dependencies information
2010-07-30* apt-pkg/pkgcache.cc:Michael Vogt1-1/+4
- re-evaluate the architectures cache when the cache is (re)opened
2010-07-25* apt-pkg/pkgcache.cc:David Kalnischkies1-3/+5
- prefer non-virtual packages in FindPreferredPkg
2010-07-08* apt-pkg/pkgcachegen.{cc,h}:David Kalnischkies1-1/+4
- 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 Kalnischkies1-6/+6
- add another round of const& madness as the previous round accidently NOT override the virtual GetCandidateVer() method (Closes: #587725)
2010-05-31* apt-pkg/cacheset.{cc,h}:David Kalnischkies1-1/+1
- add simple wrapper around std::set for cache structures
2010-05-31* apt-pkg/pkgcache.cc:David Kalnischkies1-0/+19
- get the best matching arch package from a group with FindPreferredPkg
2010-05-04* doc/files.sgml:Michael Vogt1-0/+3
- sync documentation with status quo, regarding files/directories in use, extended_states and uri schemes. * doc/cache.sgml: - drop the file in favor of inplace documentation with doxygen * apt-pkg/pkgcache.h: - enhance the Groups ABI by providing a ID as the other structs does - check also the size of the Group struct then checking for the others