From ecc138f858fab61e0b888d3d13854d1422c3432b Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 16 Jul 2015 19:41:45 +0200 Subject: just-in-time creation for (implicit) Provides Expecting the worst is easy to code, but has its disadvantages e.g. by creating package structures which otherwise would have never existed. By creating the provides instead at the time a package structure is added we are well prepared for the introduction of partial architectures, massive amounts of M-A:foreign (and :allowed) and co as far as provides are concerned at least. We have something relatively similar for dependencies already. Many tests are added for both M-A states and the code cleaned to properly support implicit provides for foreign architectures and architectures we 'just' happen to parse. Git-Dch: Ignore --- apt-pkg/pkgcachegen.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'apt-pkg/pkgcachegen.h') diff --git a/apt-pkg/pkgcachegen.h b/apt-pkg/pkgcachegen.h index c5527ff30..34dc6fead 100644 --- a/apt-pkg/pkgcachegen.h +++ b/apt-pkg/pkgcachegen.h @@ -93,6 +93,8 @@ class APT_HIDDEN pkgCacheGenerator /*{{{*/ map_pointer_t const ParentPkg, unsigned short const Hash, map_pointer_t const Next); map_pointer_t NewDescription(pkgCache::DescIterator &Desc,const std::string &Lang,const MD5SumValue &md5sum,map_stringitem_t const idxmd5str); + bool NewProvides(pkgCache::VerIterator &Ver, pkgCache::PkgIterator &Pkg, + map_stringitem_t const ProvidesVersion, uint8_t const Flags); public: @@ -167,6 +169,8 @@ class APT_HIDDEN pkgCacheGenerator::ListParser bool NewProvides(pkgCache::VerIterator &Ver,const std::string &PkgName, const std::string &PkgArch, const std::string &Version, uint8_t const Flags); + bool NewProvidesAllArch(pkgCache::VerIterator &Ver, std::string const &Package, + std::string const &Version, uint8_t const Flags); public: -- cgit v1.2.3