ref: refs/heads/master
commit 76963e32352a6913ecfdd37f2a088238de9ab1d3
Author: Michael Andres
Date: Thu Nov 26 18:34:21 2009 +0100
Fix chroot execution of update scripts.
---
zypp/target/TargetImpl.cc | 7 ++++---
1 files 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<PatchScriptReport> & 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<PatchScriptReport> report;
report->start( make<Package>( *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.
}
}
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org