diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2008-01-04 21:45:54 +0100 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2008-01-04 21:45:54 +0100 |
commit | dabe757a0a6d91e07ba30e3d580e49fe56eb4737 (patch) | |
tree | 5f7875b7d7d0208fcf9cf7a383b3b79061d45f7f /apt-pkg/cachefile.cc | |
parent | 893d3e85b98124fc28002be5584b685324646037 (diff) | |
download | apt-dabe757a0a6d91e07ba30e3d580e49fe56eb4737.tar.gz |
support optional PulseInterval in ListUpdate
Diffstat (limited to 'apt-pkg/cachefile.cc')
-rw-r--r-- | apt-pkg/cachefile.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/apt-pkg/cachefile.cc b/apt-pkg/cachefile.cc index 4c2c5689..22eac2f6 100644 --- a/apt-pkg/cachefile.cc +++ b/apt-pkg/cachefile.cc @@ -114,8 +114,11 @@ bool pkgCacheFile::Open(OpProgress &Progress,bool WithLock) /* This is a simple wrapper to update the cache. it will fetch stuff * from the network (or any other sources defined in sources.list) */ -bool pkgCacheFile::ListUpdate(pkgAcquireStatus &Stat, pkgSourceList &List) +bool pkgCacheFile::ListUpdate(pkgAcquireStatus &Stat, + pkgSourceList &List, + int PulseInterval) { + pkgAcquire::RunResult res; pkgAcquire Fetcher(&Stat); // Populate it with the source selection @@ -125,8 +128,13 @@ bool pkgCacheFile::ListUpdate(pkgAcquireStatus &Stat, pkgSourceList &List) // Run scripts RunScripts("APT::Update::Pre-Invoke"); - // Run it - if (Fetcher.Run() == pkgAcquire::Failed) + // check arguments + if(PulseInterval>0) + res = Fetcher.Run(PulseInterval); + else + res = Fetcher.Run(); + + if (res == pkgAcquire::Failed) return false; bool Failed = false; |