From 76963e32352a6913ecfdd37f2a088238de9ab1d3 Mon Sep 17 00:00:00 2001 From: Michael Andres Date: Thu, 26 Nov 2009 18:34:21 +0100 Subject: [PATCH] Fix chroot execution of update scripts. --- zypp/target/TargetImpl.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/zypp/target/TargetImpl.cc b/zypp/target/TargetImpl.cc index 5ebd361..d74c590 100644 --- a/zypp/target/TargetImpl.cc +++ b/zypp/target/TargetImpl.cc @@ -127,7 +127,7 @@ namespace zypp const Pathname & script_r, callback::SendReport & report_r ) { - MIL << "Execute script " << PathInfo(script_r) << endl; + MIL << "Execute script " << PathInfo(Pathname::assertprefix( root_r,script_r)) << endl; HistoryLog historylog; historylog.comment(script_r.asString() + _(" executed"), /*timestamp*/true); @@ -241,11 +241,12 @@ namespace zypp if ( (*sit)[prefix.size()] != '\0' && (*sit)[prefix.size()] != '-' ) continue; // if not exact match it had to continue with '-' + Pathname localPath( scriptsPath_r/(*sit) ); // without root prefix if ( abort || aborting_r ) { WAR << "Aborting: Skip update script " << *sit << endl; HistoryLog().comment( - script.path().asString() + _(" execution skipped while aborting"), + localPath.asString() + _(" execution skipped while aborting"), /*timestamp*/true); } else @@ -254,7 +255,7 @@ namespace zypp callback::SendReport report; report->start( make( *it ), script.path() ); - if ( ! executeScript( root_r, script.path(), report ) ) + if ( ! executeScript( root_r, localPath, report ) ) // script path without root prefix! abort = true; // requested abort. } } -- 2.7.4