summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcache.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:50:43 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:50:43 +0000
commitb518cca6bd64abeba1fb84e9363798e5e063469a (patch)
tree00cde5bb60cada0f0da76075f15fb0c15849e810 /apt-pkg/pkgcache.cc
parentb50b2c97b3a8cf71aaecdcea6321433d576852a9 (diff)
Sync
Author: jgg Date: 1998-07-12 01:25:59 GMT Sync
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