From 8b32e9209ecfab776f064e3c4ccab249307ae49d Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 10 Feb 2010 17:42:39 +0100 Subject: Pre-MultiArch a package which depends on a package with architecture "all" can be sure that a package comeing in as a dependency of this package will be of the same architecture as itself (or all). We don't want to break this, so internal an arch all package is represented as many arch depending packages. The only problem we have now is that we only know that a arch all package is installed or not - we don't know for which architecture it was installed: So we will look at all these broken arch all pseudo packages and "remove" them. --- apt-pkg/depcache.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'apt-pkg/depcache.h') diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index 0306861a1..63cd954ad 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -46,6 +46,7 @@ #include #include +#include class pkgDepCache : protected pkgCache::Namespace { @@ -442,9 +443,6 @@ class pkgDepCache : protected pkgCache::Namespace virtual bool IsDeleteOk(const PkgIterator &Pkg,bool Purge = false, unsigned long Depth = 0, bool FromUser = true); - // This is for debuging - void Update(OpProgress *Prog = 0); - // read persistent states bool readStateFile(OpProgress *prog); bool writeStateFile(OpProgress *prog, bool InstalledOnly=false); @@ -460,9 +458,15 @@ class pkgDepCache : protected pkgCache::Namespace inline unsigned long BadCount() {return iBadCount;}; bool Init(OpProgress *Prog); - + // Generate all state information + void Update(OpProgress *Prog = 0); + pkgDepCache(pkgCache *Cache,Policy *Plcy = 0); virtual ~pkgDepCache(); + + private: + // Helper for Update(OpProgress) to remove pseudoinstalled arch all packages + bool RemovePseudoInstalledPkg(PkgIterator &Pkg, std::set &recheck); }; #endif -- cgit v1.2.3 From 803ea2a87f81252b2c0d541b8502ed206ce57c84 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 12 Feb 2010 00:04:31 +0100 Subject: Add yet another pseudo package which isn't as pseudo as the others: 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. --- apt-pkg/depcache.h | 1 + 1 file changed, 1 insertion(+) (limited to 'apt-pkg/depcache.h') diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index 63cd954ad..ab1021a44 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -333,6 +333,7 @@ class pkgDepCache : protected pkgCache::Namespace inline Header &Head() {return *Cache->HeaderP;}; inline PkgIterator PkgBegin() {return Cache->PkgBegin();}; inline PkgIterator FindPkg(string const &Name) {return Cache->FindPkg(Name);}; + inline PkgIterator FindPkg(string const &Name, string const &Arch) {return Cache->FindPkg(Name, Arch);}; inline pkgCache &GetCache() {return *Cache;}; inline pkgVersioningSystem &VS() {return *Cache->VS;}; -- cgit v1.2.3 From e0b94b97b179812e5a0b3b72ea9fcae106d545c5 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 27 Feb 2010 17:01:12 +0100 Subject: Enable the AutoRemover to talk "Multi-Arch" by marking all pseudo packages in a group if one is marked. The auto-installed flag is from now on Architecture bound: A section without an architecture tag will be treated as applying to all architectures - the next write operation will take care of this by creating separate sections for the architectures. --- apt-pkg/depcache.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-pkg/depcache.h') diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index ab1021a44..23b29cc13 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -79,8 +79,8 @@ class pkgDepCache : protected pkgCache::Namespace */ void MarkPackage(const pkgCache::PkgIterator &pkg, const pkgCache::VerIterator &ver, - bool follow_recommends, - bool follow_suggests); + bool const &follow_recommends, + bool const &follow_suggests); /** \brief Update the Marked field of all packages. * -- cgit v1.2.3 From 1ec1653cd4849423e0d5f769ecbfab2d6f16c4ad Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 1 Mar 2010 21:59:03 +0100 Subject: We need to kill also pseudo packages which have no dependency, no installed reverse dependency and which also doesn't provide something. They cause problems if this pseudo packages get new dependencies. As a consequence we also need to recheck the dependencies of a killed pseudo package (and especially the providers of these dependencies) to really kill all non required packages. --- apt-pkg/depcache.h | 1 + 1 file changed, 1 insertion(+) (limited to 'apt-pkg/depcache.h') diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index 23b29cc13..ea605f199 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -332,6 +332,7 @@ class pkgDepCache : protected pkgCache::Namespace inline operator pkgCache &() {return *Cache;}; inline Header &Head() {return *Cache->HeaderP;}; inline PkgIterator PkgBegin() {return Cache->PkgBegin();}; + inline GrpIterator FindGrp(string const &Name) {return Cache->FindGrp(Name);}; inline PkgIterator FindPkg(string const &Name) {return Cache->FindPkg(Name);}; inline PkgIterator FindPkg(string const &Name, string const &Arch) {return Cache->FindPkg(Name, Arch);}; -- cgit v1.2.3