ref: refs/heads/ma-misc
commit f56d79027bee8d9057ef350570218c904c422dd6
Author: Michael Andres
Date: Fri Jul 17 17:14:56 2009 +0200
No need to explicitly unload the target before reloading it.
---
zypp/zypp_detail/ZYppImpl.cc | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/zypp/zypp_detail/ZYppImpl.cc b/zypp/zypp_detail/ZYppImpl.cc
index 86559e1..740646c 100644
--- a/zypp/zypp_detail/ZYppImpl.cc
+++ b/zypp/zypp_detail/ZYppImpl.cc
@@ -134,18 +134,19 @@ namespace zypp
ZYppCommitResult res = _target->_pimpl->commit( pool(), policy_r );
- if (! policy_r.dryRun() ) {
-
- DBG << "unloading " << sat::Pool::instance().systemRepoAlias() << " repo from pool" << endl;
-
- _target->unload();
-
+ if (! policy_r.dryRun() )
+ {
if ( policy_r.syncPoolAfterCommit() )
{
// reload new status from target
DBG << "reloading " << sat::Pool::instance().systemRepoAlias() << " repo to pool" << endl;
_target->load();
}
+ else
+ {
+ DBG << "unloading " << sat::Pool::instance().systemRepoAlias() << " repo from pool" << endl;
+ _target->unload();
+ }
}
MIL << "Commit (" << policy_r << ") returned: "
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org