summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcachegen.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-02-10 17:42:39 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-02-10 17:42:39 +0100
commit8b32e9209ecfab776f064e3c4ccab249307ae49d (patch)
treedf0a6a283bff447e55a9345425eba17c1e90bb5c /apt-pkg/pkgcachegen.cc
parent857e9c13d8d9808fcd1ac8ff3469f6c0b90b7fea (diff)
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.
Diffstat (limited to 'apt-pkg/pkgcachegen.cc')
-rw-r--r--apt-pkg/pkgcachegen.cc16
1 files changed, 14 insertions, 2 deletions
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc
index 2a4a30349..a4ca9dfe4 100644
--- a/apt-pkg/pkgcachegen.cc
+++ b/apt-pkg/pkgcachegen.cc
@@ -108,13 +108,24 @@ bool pkgCacheGenerator::MergeList(ListParser &List,
unsigned int Counter = 0;
while (List.Step() == true)
{
- // Get a pointer to the package structure
string const PackageName = List.Package();
if (PackageName.empty() == true)
return false;
+ /* As we handle Arch all packages as architecture bounded
+ we add all information to every (simulated) arch package */
+ std::vector<string> genArch;
+ if (List.ArchitectureAll() == true)
+ genArch = APT::Configuration::getArchitectures();
+ else
+ genArch.push_back(List.Architecture());
+
+ for (std::vector<string>::const_iterator arch = genArch.begin();
+ arch != genArch.end(); ++arch)
+ {
+ // Get a pointer to the package structure
pkgCache::PkgIterator Pkg;
- if (NewPackage(Pkg, PackageName, List.Architecture()) == false)
+ if (NewPackage(Pkg, PackageName, *arch) == false)
return _error->Error(_("Error occurred while processing %s (NewPackage)"),PackageName.c_str());
Counter++;
if (Counter % 100 == 0 && Progress != 0)
@@ -257,6 +268,7 @@ bool pkgCacheGenerator::MergeList(ListParser &List,
if ((*LastDesc == 0 && _error->PendingError()) || NewFileDesc(Desc,List) == false)
return _error->Error(_("Error occurred while processing %s (NewFileDesc2)"),PackageName.c_str());
+ }
}
FoundFileDeps |= List.HasFileDeps();