Mailinglist Archive: zypp-commit (232 mails)

< Previous Next >
[zypp-commit] <libzypp> master : Fix chroot execution of update scripts.
  • From: Michael Andres <ma@xxxxxxx>
  • Date: Thu, 26 Nov 2009 18:34:21 +0100
  • Message-id: <E1NDiEs-00061q-JE@xxxxxxxxxxxxxxxx>
ref: refs/heads/master
commit 76963e32352a6913ecfdd37f2a088238de9ab1d3
Author: Michael Andres <ma@xxxxxxx>
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@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages