summaryrefslogtreecommitdiff
path: root/apt-pkg/cachefile.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-06-07 10:03:41 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-06-07 10:03:41 +0200
commit614adaa09f9f24dccd9e2e8bb4eb00d17285c92e (patch)
treebc2def8dc62ec49a60fa162b38cd47ee51b77b7e /apt-pkg/cachefile.cc
parent89b70b5a5c80b15d928b6593604bacc02a1b9a51 (diff)
* apt-pkg/deb/dpkgpm.cc, apt-pkg/contrib/fileutl.{cc,h}:
- move the RunScripts() code into fileutl.{cc,h} * apt-pkg/cachefile.cc: - add support for "APT::Update::{Pre,Post}-Invoke" scripts
Diffstat (limited to 'apt-pkg/cachefile.cc')
-rw-r--r--apt-pkg/cachefile.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/apt-pkg/cachefile.cc b/apt-pkg/cachefile.cc
index 96d9672c2..8b8e6dc98 100644
--- a/apt-pkg/cachefile.cc
+++ b/apt-pkg/cachefile.cc
@@ -24,6 +24,7 @@
#include <apt-pkg/policy.h>
#include <apt-pkg/pkgsystem.h>
#include <apt-pkg/acquire-item.h>
+#include <apt-pkg/fileutl.h>
#include <apti18n.h>
/*}}}*/
@@ -123,6 +124,9 @@ bool pkgCacheFile::ListUpdate(pkgAcquireStatus &Stat, pkgSourceList &List)
if (List.GetIndexes(&Fetcher) == false)
return false;
+ // Run scripts
+ RunScripts("APT::Update::Pre-Invoke");
+
// Run it
if (Fetcher.Run() == pkgAcquire::Failed)
return false;
@@ -152,6 +156,8 @@ bool pkgCacheFile::ListUpdate(pkgAcquireStatus &Stat, pkgSourceList &List)
return false;
}
+ // Run the scripts
+ RunScripts("APT::Update::Post-Invoke");
return (Failed == false);
}