From 39327c73ace5c6600ddc62f3388ffc9528a3d252 Mon Sep 17 00:00:00 2001 From: Duncan Mac-Vicar P Date: Fri, 11 Aug 2006 15:02:56 +0000 Subject: [PATCH] =?utf8?q?-=20backport:=20-=20Add=20explicit=20finish=20ca?= =?utf8?q?llbacks=20for=20subtasks=20during=20ProvidePackage=20=20=C2=A0to?= =?utf8?q?=20avoid=20UI=20confusion.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- zypp/ZYppCallbacks.h | 9 +++++++++ zypp/source/PackageProvider.cc | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/zypp/ZYppCallbacks.h b/zypp/ZYppCallbacks.h index 89328c8..cc04c42 100644 --- a/zypp/ZYppCallbacks.h +++ b/zypp/ZYppCallbacks.h @@ -60,6 +60,9 @@ namespace zypp virtual void problemDeltaDownload( std::string description ) {} + virtual void finishDeltaDownload() + {} + // Apply delta rpm: // - local path of downloaded delta // - aplpy is not interruptable @@ -73,6 +76,9 @@ namespace zypp virtual void problemDeltaApply( std::string description ) {} + virtual void finishDeltaApply() + {} + // Dowmload patch rpm: // - path below url reported on start() // - expected download size (0 if unknown) @@ -86,6 +92,9 @@ namespace zypp virtual void problemPatchDownload( std::string description ) {} + virtual void finishPatchDownload() + {} + // return false if the download should be aborted right now virtual bool progress(int value, Resolvable::constPtr resolvable_ptr) diff --git a/zypp/source/PackageProvider.cc b/zypp/source/PackageProvider.cc index 602c53f..a26ed2b 100644 --- a/zypp/source/PackageProvider.cc +++ b/zypp/source/PackageProvider.cc @@ -170,6 +170,7 @@ namespace zypp report()->problemDeltaDownload( excpt.asUserString() ); return ManagedFile(); } + report()->finishDeltaDownload(); report()->startDeltaApply( delta ); if ( ! applydeltarpm::check( delta_r.baseversion().sequenceinfo() ) ) @@ -178,7 +179,6 @@ namespace zypp return ManagedFile(); } - Pathname destination( Pathname::dirname( delta ) / defRpmFileName( _package ) ); /* just to ease testing with non remote sources */ if ( ! _package->source().remote() ) @@ -191,6 +191,7 @@ namespace zypp report()->problemDeltaApply( "applydeltarpm failed." ); return ManagedFile(); } + report()->finishDeltaApply(); return ManagedFile( destination, filesystem::unlink ); } @@ -219,6 +220,7 @@ namespace zypp report()->problemPatchDownload( excpt.asUserString() ); return ManagedFile(); } + report()->finishPatchDownload(); return patch; } -- 2.7.4