summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcache.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-02-12 00:04:31 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-02-12 00:04:31 +0100
commit803ea2a87f81252b2c0d541b8502ed206ce57c84 (patch)
treef6d5f02637a7bcd62330c1a51bca42a34378c0b1 /apt-pkg/pkgcache.cc
parentc5dac10c3dd6d8f54d97d3105803d07fa891fcd4 (diff)
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.
Diffstat (limited to 'apt-pkg/pkgcache.cc')
-rw-r--r--apt-pkg/pkgcache.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index 2d4ee1010..04a2c7234 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -649,6 +649,18 @@ bool pkgCache::VerIterator::Automatic() const
return false;
}
/*}}}*/
+// VerIterator::Pseudo - Check if this version is a pseudo one /*{{{*/
+// ---------------------------------------------------------------------
+/* Sometimes you have the need to express dependencies with versions
+ which doesn't really exist or exist multiply times for "different"
+ packages. We need these versions for dependency resolution but they
+ are a problem everytime we need to download/install something. */
+bool pkgCache::VerIterator::Pseudo() const
+{
+ return (S->MultiArch == pkgCache::Version::All &&
+ strcmp(Arch(true),"all") != 0);
+}
+ /*}}}*/
// VerIterator::NewestFile - Return the newest file version relation /*{{{*/
// ---------------------------------------------------------------------
/* This looks at the version numbers associated with all of the sources