ref: refs/heads/master
commit 3868ca817434e3bcf610037ed132b0a527a516eb
Author: Michael Andres
Date: Mon Oct 5 13:56:45 2009 +0200
Cleanup internal and deprecated commit methods.
---
zypp/target/TargetImpl.cc | 5 +++--
zypp/target/TargetImpl.h | 30 ++++++++----------------------
2 files changed, 11 insertions(+), 24 deletions(-)
diff --git a/zypp/target/TargetImpl.cc b/zypp/target/TargetImpl.cc
index d79a00f..8245fa0 100644
--- a/zypp/target/TargetImpl.cc
+++ b/zypp/target/TargetImpl.cc
@@ -1106,8 +1106,8 @@ namespace zypp
}
else if ( ! policy_r.dryRun() )
{
- commit ( to_uninstall, policy_r, packageCache );
- TargetImpl::PoolItemList bad = commit( items, policy_r, packageCache );
+ commit ( to_uninstall, policy_r, result, packageCache );
+ TargetImpl::PoolItemList bad = commit( items, policy_r, result, packageCache );
if ( ! bad.empty() )
{
for_( it, bad.begin(), bad.end() )
@@ -1151,6 +1151,7 @@ namespace zypp
TargetImpl::PoolItemList
TargetImpl::commit( const TargetImpl::PoolItemList & items_r,
const ZYppCommitPolicy & policy_r,
+ ZYppCommitResult & result_r,
CommitPackageCache & packageCache_r )
{
MIL << "TargetImpl::commit(<list>" << policy_r << ")" << items_r.size() << endl;
diff --git a/zypp/target/TargetImpl.h b/zypp/target/TargetImpl.h
index 1ffe62c..adc6c47 100644
--- a/zypp/target/TargetImpl.h
+++ b/zypp/target/TargetImpl.h
@@ -126,28 +126,6 @@ namespace zypp
/** Commit changes in the pool */
ZYppCommitResult commit( ResPool pool_r, const ZYppCommitPolicy & policy_r );
- ZYPP_DEPRECATED int commit( ResPool pool_r, unsigned int medianr,
- PoolItemList & errors_r,
- PoolItemList & remaining_r,
- PoolItemList & srcremaining_r,
- bool dry_run = false )
- {
- ZYppCommitPolicy policy;
- policy.restrictToMedia( medianr ).dryRun( dry_run );
- ZYppCommitResult res = commit( pool_r, policy );
- errors_r.swap( res._errors );
- remaining_r.swap( res._remaining );
- srcremaining_r.swap( res._srcremaining );
- return res._result;
- }
-
- /** Commit ordered changes
- * @param packageCache_r Access to the package provider
- * @return uncommitted ones (due to error)
- */
- PoolItemList commit( const PoolItemList & items_r, const ZYppCommitPolicy & policy_r,
- CommitPackageCache & packageCache_r );
-
/** Install a source package on the Target. */
void installSrcPackage( const SrcPackage_constPtr & srcPackage_r );
@@ -190,6 +168,13 @@ namespace zypp
/** \copydoc Target::distributionFlavor() */
std::string distributionFlavor() const;
+ private:
+ /** Commit ordered changes (internal helper) */
+ PoolItemList commit( const PoolItemList & items_r,
+ const ZYppCommitPolicy & policy_r,
+ ZYppCommitResult & result_r,
+ CommitPackageCache & packageCache_r );
+
protected:
/** Path to the target */
Pathname _root;
@@ -203,6 +188,7 @@ namespace zypp
HardLocksFile _hardLocksFile;
/** Cache distributionVersion */
mutable std::string _distributionVersion;
+
private:
/** Null implementation */
static TargetImpl_Ptr _nullimpl;
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org