diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:51:27 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:51:27 +0000 |
commit | 03e39e592311fd327ea516d31567557830634c86 (patch) | |
tree | 6fc4479836bf5df004ecc5b387854d95a54a7b05 /apt-pkg/packagemanager.cc | |
parent | d7827acababa05db7e901d2dfeb27538ef6a6142 (diff) |
Archive acquire code
Author: jgg
Date: 1998-11-13 04:23:26 GMT
Archive acquire code
Diffstat (limited to 'apt-pkg/packagemanager.cc')
-rw-r--r-- | apt-pkg/packagemanager.cc | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc index 1780dff09..2b47d425b 100644 --- a/apt-pkg/packagemanager.cc +++ b/apt-pkg/packagemanager.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: packagemanager.cc,v 1.4 1998/07/12 23:58:30 jgg Exp $ +// $Id: packagemanager.cc,v 1.5 1998/11/13 04:23:30 jgg Exp $ /* ###################################################################### Package Manager - Abstacts the package manager @@ -21,6 +21,7 @@ #include <apt-pkg/depcache.h> #include <apt-pkg/error.h> #include <apt-pkg/version.h> +#include <apt-pkg/acquire-item.h> /*}}}*/ // PM::PackageManager - Constructor /*{{{*/ @@ -41,6 +42,26 @@ pkgPackageManager::~pkgPackageManager() delete [] FileNames; } /*}}}*/ +// PM::GetArchives - Queue the archives for download /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool pkgPackageManager::GetArchives(pkgAcquire *Owner,pkgSourceList *Sources, + pkgRecords *Recs) +{ + pkgCache::PkgIterator I = Cache.PkgBegin(); + for (;I.end() != true; I++) + { + // Not interesting + if ((Cache[I].InstallVer == (pkgCache::Version *)I.CurrentVer() && + I.State() != pkgCache::PkgIterator::NeedsUnpack) || + Cache[I].Delete() == true) + continue; + + new pkgAcqArchive(Owner,Sources,Recs,Cache[I].InstVerIter(Cache)); + } + return true; +} + /*}}}*/ // PM::FixMissing - Keep all missing packages /*{{{*/ // --------------------------------------------------------------------- /* This is called to correct the installation when packages could not |