From 614adaa09f9f24dccd9e2e8bb4eb00d17285c92e Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 7 Jun 2006 10:03:41 +0200 Subject: * 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 --- apt-pkg/cachefile.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'apt-pkg/cachefile.cc') 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 #include #include +#include #include /*}}}*/ @@ -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); } -- cgit v1.2.3