summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcache.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/pkgcache.cc')
-rw-r--r--apt-pkg/pkgcache.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index 085225031..b8af6b5e4 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: pkgcache.cc,v 1.5 1998/07/07 04:17:02 jgg Exp $
+// $Id: pkgcache.cc,v 1.6 1998/07/12 01:26:04 jgg Exp $
/* ######################################################################
Package Cache - Accessor code for the cache
@@ -358,6 +358,18 @@ int pkgCache::VerIterator::CompareVer(const VerIterator &B) const
return -1;
}
/*}}}*/
+// VerIterator::Downloadable - Checks if the version is downloadable /*{{{*/
+// ---------------------------------------------------------------------
+/* */
+bool pkgCache::VerIterator::Downloadable() const
+{
+ VerFileIterator Files = FileList();
+ for (; Files.end() == false; Files++)
+ if ((Files.File()->Flags & Flag::NotSource) != Flag::NotSource)
+ return true;
+ return false;
+}
+ /*}}}*/
// PkgFileIterator::IsOk - Checks if the cache is in sync with the file /*{{{*/
// ---------------------------------------------------------------------
/* This stats the file and compares its stats with the ones that were