From: Michael Andres Date: Tue, 11 Apr 2006 23:39:19 +0000 (+0000) Subject: - Added ZYppCommitPolicy for passing policy options to commit. Old style X-Git-Tag: BASE-SuSE-SLE-10-SP2-Branch~1071 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bb7df110922a3a4231a41580b5134f87164a8310;p=platform%2Fupstream%2Flibzypp.git - Added ZYppCommitPolicy for passing policy options to commit. Old style interfaces are tagged deprecated. Installed direct communication between ZYppImpl and TargetImpl, to get rid of Target::commit. Interface to commit is: ZYppCommitResult ZYpp::commit( const ZYppCommitPolicy & policy_r ) --- diff --git a/zypp/Makefile.am b/zypp/Makefile.am index 72c882b..0a7dcf5 100644 --- a/zypp/Makefile.am +++ b/zypp/Makefile.am @@ -84,6 +84,8 @@ pkginclude_HEADERS = NeedAType.h \ UpgradeStatistics.h \ TranslatedText.h \ ZYpp.h \ + ZYppCommit.h \ + ZYppCommitPolicy.h \ ZYppCommitResult.h \ ZYppFactory.h \ ZYppCallbacks.h \ @@ -156,6 +158,8 @@ lib@PACKAGE@_la_SOURCES = \ VendorAttr.cc \ UpgradeStatistics.cc \ ZYpp.cc \ + ZYppCommitPolicy.cc \ + ZYppCommitResult.cc \ TranslatedText.cc \ ZYppFactory.cc \ KeyRing.cc diff --git a/zypp/Target.h b/zypp/Target.h index 6b7f4b8..e112e0d 100644 --- a/zypp/Target.h +++ b/zypp/Target.h @@ -14,6 +14,8 @@ #include +#include "zypp/base/ReferenceCounted.h" +#include "zypp/base/NonCopyable.h" #include "zypp/base/PtrTypes.h" #include "zypp/base/Deprecated.h" @@ -31,6 +33,10 @@ namespace zypp class RpmDb; } } + namespace zypp_detail + { + class ZYppImpl; + } DEFINE_PTR_TYPE(Target); @@ -51,10 +57,13 @@ namespace zypp /** All resolvables provided by the target. */ const ResStore & resolvables(); + /** Null implementation */ static Target_Ptr nullimpl(); + /** Refference to the RPM database */ target::rpm::RpmDb & rpmDb(); + /** Commit changes in the pool * \param medianr 0 = all/any media * > 0 means only the given media number @@ -62,23 +71,28 @@ namespace zypp * * \todo Interface to commit should be ZYpp::commit( medianr ). This call * should be removed from the targets public interface, as soon as ZYpp::Impl - * is able to call Target::I,pl. + * is able to call Target::Impl. */ - int commit( ResPool pool_r, int medianr, PoolItemList & errors_r - , PoolItemList & remaining_r, PoolItemList & srcremaining_r, bool dry_run = false ) ZYPP_DEPRECATED; + int commit( ResPool pool_r, int medianr, + PoolItemList & errors_r, + PoolItemList & remaining_r, + PoolItemList & srcremaining_r, + bool dry_run = false ) ZYPP_DEPRECATED; - /** If the package is installed and provides the file - Needed to evaluate split provides during Resolver::Upgrade() */ - bool providesFile (const std::string & name_str, const std::string & path_str) const; + /** If the package is installed and provides the file + Needed to evaluate split provides during Resolver::Upgrade() */ + bool providesFile (const std::string & name_str, const std::string & path_str) const; - ResObject::constPtr whoOwnsFile (const std::string & path_str) const; + ResObject::constPtr whoOwnsFile (const std::string & path_str) const; - /** JUST FOR TESTSUITE */ - /** Sort according to prereqs and media numbers */ - void getResolvablesToInsDel ( const ResPool pool_r, - PoolItemList & dellist_r, - PoolItemList & instlist_r, - PoolItemList & srclist_r ) const; + /** JUST FOR TESTSUITE */ + /** Sort according to prereqs and media numbers + * \todo provide it as standalone algorithm + */ + void getResolvablesToInsDel ( const ResPool pool_r, + PoolItemList & dellist_r, + PoolItemList & instlist_r, + PoolItemList & srclist_r ) const; #ifndef STORAGE_DISABLED /** enables the storage target */ @@ -106,12 +120,13 @@ namespace zypp std::ostream & dumpOn( std::ostream & str ) const; private: + /** Direct access to Impl. */ + friend class zypp_detail::ZYppImpl; + /** Pointer to implementation */ RW_pointer > _pimpl; static Target_Ptr _nullimpl; - - public: }; /////////////////////////////////////////////////////////////////// diff --git a/zypp/ZYpp.cc b/zypp/ZYpp.cc index 735f14c..d14b22b 100644 --- a/zypp/ZYpp.cc +++ b/zypp/ZYpp.cc @@ -102,8 +102,8 @@ namespace zypp void ZYpp::finishTarget() { _pimpl->finishTarget(); } - ZYpp::CommitResult ZYpp::commit( int medianr_r, bool dry_run ) - { return _pimpl->commit( medianr_r, dry_run ); } + ZYppCommitResult ZYpp::commit( const ZYppCommitPolicy & policy_r ) + { return _pimpl->commit( policy_r ); } /////////////////////////////////////////////////////////////////// @@ -127,11 +127,13 @@ namespace zypp Arch ZYpp::architecture() const { return _pimpl->architecture(); } + void ZYpp::setArchitecture( const Arch & arch ) { _pimpl->setArchitecture( arch ); } Pathname ZYpp::homePath() const { return _pimpl->homePath(); } + void ZYpp::setHomePath( const Pathname & path ) { _pimpl->setHomePath(path); } diff --git a/zypp/ZYpp.h b/zypp/ZYpp.h index d7a303f..3a9dbd6 100644 --- a/zypp/ZYpp.h +++ b/zypp/ZYpp.h @@ -17,6 +17,10 @@ #include "zypp/base/ReferenceCounted.h" #include "zypp/base/NonCopyable.h" #include "zypp/base/PtrTypes.h" + +#include "zypp/base/Deprecated.h" +#include "zypp/ZYppCommit.h" + #include "zypp/Target.h" #include "zypp/Resolver.h" #include "zypp/KeyRing.h" @@ -96,16 +100,22 @@ namespace zypp public: - /** Result returned from ZYpp::commit. */ - struct CommitResult; + typedef ZYppCommitResult CommitResult; /** Commit changes and transactions. - * \param medianr 0 = all/any media - * > 0 means only the given media number + * \param \ref CommitPolicy * \return \ref CommitResult * \throws Exception */ - CommitResult commit( int medianr_r, bool dry_run = false ); + ZYppCommitResult commit( const ZYppCommitPolicy & policy_r ); + + ZYPP_DEPRECATED ZYppCommitResult commit( int medianr_r, bool dry_run = false ) + { + ZYppCommitPolicy policy; + policy.restrictToMedia( medianr_r ).dryRun( dry_run ); + return commit( policy ); + } + public: /** */ diff --git a/zypp/ZYppCommit.h b/zypp/ZYppCommit.h new file mode 100644 index 0000000..959ad73 --- /dev/null +++ b/zypp/ZYppCommit.h @@ -0,0 +1,26 @@ +/*---------------------------------------------------------------------\ +| ____ _ __ __ ___ | +| |__ / \ / / . \ . \ | +| / / \ V /| _/ _/ | +| / /__ | | | | | | | +| /_____||_| |_| |_| | +| | +\---------------------------------------------------------------------*/ +/** \file zypp/ZYppCommit.h + * +*/ +#ifndef ZYPP_ZYPPCOMMIT_H +#define ZYPP_ZYPPCOMMIT_H + +#include + +#include "zypp/ZYppCommitPolicy.h" +#include "zypp/ZYppCommitResult.h" + +/////////////////////////////////////////////////////////////////// +namespace zypp +{ ///////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////// +} // namespace zypp +/////////////////////////////////////////////////////////////////// +#endif // ZYPP_ZYPPCOMMIT_H diff --git a/zypp/ZYppCommitPolicy.cc b/zypp/ZYppCommitPolicy.cc new file mode 100644 index 0000000..62161d1 --- /dev/null +++ b/zypp/ZYppCommitPolicy.cc @@ -0,0 +1,33 @@ +/*---------------------------------------------------------------------\ +| ____ _ __ __ ___ | +| |__ / \ / / . \ . \ | +| / / \ V /| _/ _/ | +| / /__ | | | | | | | +| /_____||_| |_| |_| | +| | +\---------------------------------------------------------------------*/ +/** \file zypp/ZYppCommitPolicy.cc + * +*/ + +#include + +#include "zypp/ZYppCommitPolicy.h" + +/////////////////////////////////////////////////////////////////// +namespace zypp +{ ///////////////////////////////////////////////////////////////// + + std::ostream & operator<<( std::ostream & str, const ZYppCommitPolicy & obj ) + { + str << "CommitPolicy("; + if ( obj.restrictToMedia() ) + str << " restrictToMedia:" << obj.restrictToMedia(); + if ( obj.dryRun() ) + str << " dryRun" << obj.restrictToMedia(); + return str << " )"; + } + + ///////////////////////////////////////////////////////////////// +} // namespace zypp +/////////////////////////////////////////////////////////////////// diff --git a/zypp/ZYppCommitPolicy.h b/zypp/ZYppCommitPolicy.h new file mode 100644 index 0000000..e3def5c --- /dev/null +++ b/zypp/ZYppCommitPolicy.h @@ -0,0 +1,69 @@ +/*---------------------------------------------------------------------\ +| ____ _ __ __ ___ | +| |__ / \ / / . \ . \ | +| / / \ V /| _/ _/ | +| / /__ | | | | | | | +| /_____||_| |_| |_| | +| | +\---------------------------------------------------------------------*/ +/** \file zypp/ZYppCommitPolicy.h + * +*/ +#ifndef ZYPP_ZYPPCOMMITPOLICY_H +#define ZYPP_ZYPPCOMMITPOLICY_H + +#include + +/////////////////////////////////////////////////////////////////// +namespace zypp +{ ///////////////////////////////////////////////////////////////// + + /////////////////////////////////////////////////////////////////// + // + // CLASS NAME : ZYppCommitPolicy + // + /** */ + class ZYppCommitPolicy + { + public: + ZYppCommitPolicy() + : _restrictToMedia( 0 ) + , _dryRun( false ) + {} + + public: + unsigned restrictToMedia() const + { return _restrictToMedia; } + + bool dryRun() const + { return _dryRun; } + + public: + /** Restrict commit to a certain media number + * \deprecated + */ + ZYppCommitPolicy & restrictToMedia( unsigned mediaNr_r ) + { _restrictToMedia = mediaNr_r; return *this; } + + /** Process all media (default) */ + ZYppCommitPolicy & allMedia() + { return restrictToMedia( 0 ); } + + /** Set dry run (default: false) */ + ZYppCommitPolicy & dryRun( bool yesNo_r = true ) + { _dryRun = yesNo_r; return *this; } + + private: + unsigned _restrictToMedia; + bool _dryRun; + + }; + /////////////////////////////////////////////////////////////////// + + /** \relates ZYppCommitPolicy Stream output. */ + std::ostream & operator<<( std::ostream & str, const ZYppCommitPolicy & obj ); + + ///////////////////////////////////////////////////////////////// +} // namespace zypp +/////////////////////////////////////////////////////////////////// +#endif // ZYPP_ZYPPCOMMITPOLICY_H diff --git a/zypp/ZYppCommitResult.cc b/zypp/ZYppCommitResult.cc new file mode 100644 index 0000000..eaf186c --- /dev/null +++ b/zypp/ZYppCommitResult.cc @@ -0,0 +1,33 @@ +/*---------------------------------------------------------------------\ +| ____ _ __ __ ___ | +| |__ / \ / / . \ . \ | +| / / \ V /| _/ _/ | +| / /__ | | | | | | | +| /_____||_| |_| |_| | +| | +\---------------------------------------------------------------------*/ +/** \file zypp/ZYppCommitResult.cc + * +*/ + +#include + +#include "zypp/ZYppCommitResult.h" + +/////////////////////////////////////////////////////////////////// +namespace zypp +{ ///////////////////////////////////////////////////////////////// + + std::ostream & operator<<( std::ostream & str, const ZYppCommitResult & obj ) + { + str << "CommitResult " << obj._result + << " (errors " << obj._errors.size() + << ", remaining " << obj._remaining.size() + << ", srcremaining " << obj._srcremaining.size() + << ")"; + return str; + } + + ///////////////////////////////////////////////////////////////// +} // namespace zypp +/////////////////////////////////////////////////////////////////// diff --git a/zypp/ZYppCommitResult.h b/zypp/ZYppCommitResult.h index c143747..59d6eae 100644 --- a/zypp/ZYppCommitResult.h +++ b/zypp/ZYppCommitResult.h @@ -15,7 +15,6 @@ #include #include -#include "zypp/ZYpp.h" #include "zypp/PoolItem.h" /////////////////////////////////////////////////////////////////// @@ -24,17 +23,17 @@ namespace zypp /////////////////////////////////////////////////////////////////// // - // CLASS NAME : ZYpp::CommitResult + // CLASS NAME : ZYppCommitResult // /** Result returned from ZYpp::commit. * \see \ref ZYpp::commit * \todo document fields. */ - struct ZYpp::CommitResult + struct ZYppCommitResult { - CommitResult() - : _result(0) - { } + ZYppCommitResult() + : _result(0) + {} typedef std::list PoolItemList; @@ -45,6 +44,9 @@ namespace zypp }; /////////////////////////////////////////////////////////////////// + /** \relates ZYppCommitResult Stream output. */ + std::ostream & operator<<( std::ostream & str, const ZYppCommitResult & obj ); + ///////////////////////////////////////////////////////////////// } // namespace zypp /////////////////////////////////////////////////////////////////// diff --git a/zypp/target/TargetImpl.cc b/zypp/target/TargetImpl.cc index 2816fb6..e7af832 100644 --- a/zypp/target/TargetImpl.cc +++ b/zypp/target/TargetImpl.cc @@ -139,30 +139,27 @@ namespace zypp } - int TargetImpl::commit( ResPool pool_r, unsigned int medianr, - TargetImpl::PoolItemList & errors_r, TargetImpl::PoolItemList & remaining_r, - TargetImpl::PoolItemList & srcremaining_r, bool dry_run ) - { - MIL << "TargetImpl::commit(, " << medianr << ")" << endl; - errors_r.clear(); - remaining_r.clear(); - srcremaining_r.clear(); + ZYppCommitResult TargetImpl::commit( ResPool pool_r, const ZYppCommitPolicy & policy_r ) + { + MIL << "TargetImpl::commit(, " << policy_r << ")" << endl; + ZYppCommitResult result; +#warning Commit does not provide ZYppCommitResult::_errors TargetImpl::PoolItemList to_uninstall; TargetImpl::PoolItemList to_install; TargetImpl::PoolItemList to_srcinstall; getResolvablesToInsDel( pool_r, to_uninstall, to_install, to_srcinstall ); - if ( medianr ) { - MIL << "Restrict to media number " << medianr << endl; + if ( policy_r.restrictToMedia() ) { + MIL << "Restrict to media number " << policy_r.restrictToMedia() << endl; } - commit (to_uninstall, dry_run); + commit (to_uninstall, policy_r ); - if (medianr == 0) { // commit all - remaining_r = commit( to_install, dry_run ); - srcremaining_r = commit( to_srcinstall, dry_run ); + if (policy_r.restrictToMedia() == 0) { // commit all + result._remaining = commit( to_install, policy_r ); + result._srcremaining = commit( to_srcinstall, policy_r ); } else { @@ -173,45 +170,49 @@ namespace zypp { Resolvable::constPtr res( it->resolvable() ); Package::constPtr pkg( asKind(res) ); - if (pkg && medianr != pkg->mediaId()) // check medianr for packages only + if (pkg && policy_r.restrictToMedia() != pkg->mediaId()) // check medianr for packages only { XXX << "Package " << *pkg << ", wrong media " << pkg->mediaId() << endl; - remaining_r.push_back( *it ); + result._remaining.push_back( *it ); } else { current_install.push_back( *it ); } } - TargetImpl::PoolItemList bad = commit( current_install, dry_run ); - remaining_r.insert(remaining_r.end(), bad.begin(), bad.end()); + TargetImpl::PoolItemList bad = commit( current_install, policy_r ); + result._remaining.insert(result._remaining.end(), bad.begin(), bad.end()); for (TargetImpl::PoolItemList::iterator it = to_srcinstall.begin(); it != to_srcinstall.end(); ++it) { Resolvable::constPtr res( it->resolvable() ); Package::constPtr pkg( asKind(res) ); - if (pkg && medianr != pkg->mediaId()) // check medianr for packages only + if (pkg && policy_r.restrictToMedia() != pkg->mediaId()) // check medianr for packages only { XXX << "Package " << *pkg << ", wrong media " << pkg->mediaId() << endl; - srcremaining_r.push_back( *it ); + result._srcremaining.push_back( *it ); } else { current_srcinstall.push_back( *it ); } } - bad = commit( current_srcinstall, dry_run ); - srcremaining_r.insert(srcremaining_r.end(), bad.begin(), bad.end()); + bad = commit( current_srcinstall, policy_r ); + result._srcremaining.insert(result._srcremaining.end(), bad.begin(), bad.end()); } - return to_install.size() - remaining_r.size(); + + + result._result = (to_install.size() - result._remaining.size()); + return result; } TargetImpl::PoolItemList - TargetImpl::commit( const TargetImpl::PoolItemList & items_r, bool dry_run ) + TargetImpl::commit( const TargetImpl::PoolItemList & items_r, + const ZYppCommitPolicy & policy_r ) { TargetImpl::PoolItemList remaining; - MIL << "TargetImpl::commit(" << (dry_run?", dry_run" : "") << ")" << endl; + MIL << "TargetImpl::commit(" << policy_r << ")" << endl; bool abort = false; @@ -248,7 +249,7 @@ namespace zypp try { progress.tryLevel( target::rpm::InstallResolvableReport::RPM ); if (p->installOnly()) flags |= rpm::RpmDb::RPMINST_NOUPGRADE; - if (dry_run) flags |= rpm::RpmDb::RPMINST_TEST; + if (policy_r.dryRun()) flags |= rpm::RpmDb::RPMINST_TEST; rpm().installPackage( localfile, flags ); if( progress.aborted() ) @@ -263,7 +264,7 @@ namespace zypp catch (Exception & excpt_r) { ZYPP_CAUGHT(excpt_r); WAR << "Install failed, retrying with --nodeps" << endl; - if (dry_run) { + if (policy_r.dryRun()) { WAR << "dry run failed" << endl; abort = true; progress.disconnect(); @@ -309,7 +310,7 @@ namespace zypp } } if (success - && !dry_run) + && !policy_r.dryRun()) { it->status().setTransact( false, ResStatus::USER ); } @@ -323,7 +324,7 @@ namespace zypp RpmRemovePackageReceiver progress( it->resolvable() ); progress.connect(); unsigned flags = rpm::RpmDb::RPMINST_NODEPS; - if (dry_run) flags |= rpm::RpmDb::RPMINST_TEST; + if (policy_r.dryRun()) flags |= rpm::RpmDb::RPMINST_TEST; try { rpm().removePackage( p, flags ); } @@ -333,14 +334,14 @@ namespace zypp ZYPP_CAUGHT( excpt_r ); } if (success - && !dry_run) + && !policy_r.dryRun()) { it->status().setTransact( false, ResStatus::USER ); } progress.disconnect(); } } - else if (!dry_run) // other resolvables + else if (!policy_r.dryRun()) // other resolvables { if ( isStorageEnabled() ) { diff --git a/zypp/target/TargetImpl.h b/zypp/target/TargetImpl.h index 2b1a24b..518c262 100644 --- a/zypp/target/TargetImpl.h +++ b/zypp/target/TargetImpl.h @@ -21,6 +21,7 @@ #include "zypp/base/PtrTypes.h" #include "zypp/ResStore.h" #include "zypp/PoolItem.h" +#include "zypp/ZYppCommit.h" #include "zypp/Pathname.h" #include "zypp/media/MediaAccess.h" @@ -84,10 +85,23 @@ namespace zypp /** The root set for this target */ Pathname root() const; - /** Commit changes in the pool - media = 0 means any/all medias - media > 0 means limit commits to this media */ - int commit( ResPool pool_r, unsigned int medianr, PoolItemList & errors_r, PoolItemList & remaining_r, PoolItemList & srcremaining_r, bool dry_run = false ); + /** 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; + } /** enables the storage target */ bool isStorageEnabled() const; @@ -95,7 +109,7 @@ namespace zypp /** Commit ordered changes return uncommitted ones (due to error) */ - PoolItemList commit( const PoolItemList & items_r, bool dry_run = false ); + PoolItemList commit( const PoolItemList & items_r, const ZYppCommitPolicy & policy_r ); /** Overload to realize stream output. */ virtual std::ostream & dumpOn( std::ostream & str ) const diff --git a/zypp/zypp_detail/ZYppImpl.cc b/zypp/zypp_detail/ZYppImpl.cc index ba540e9..206e0d4 100644 --- a/zypp/zypp_detail/ZYppImpl.cc +++ b/zypp/zypp_detail/ZYppImpl.cc @@ -18,6 +18,8 @@ #include "zypp/zypp_detail/ZYppImpl.h" #include "zypp/detail/ResImplTraits.h" #include "zypp/solver/detail/Helper.h" +#include "zypp/target/TargetImpl.h" +#include "zypp/ZYpp.h" #include "zypp/NVRAD.h" #include "zypp/Language.h" #include "zypp/DiskUsageCounter.h" @@ -74,7 +76,7 @@ namespace zypp MIL << "initializing keyring..." << std::endl; //_keyring = new KeyRing(homePath() + Pathname("/keyring/all"), homePath() + Pathname("/keyring/trusted")); _keyring = new KeyRing(); - + struct utsname buf; if (uname (&buf) < 0) { ERR << "Can't determine system architecture" << endl; @@ -204,35 +206,23 @@ namespace zypp // commit /** \todo Remove workflow from target, lot's of it could be done here, - * and target used for transact. */ - ZYpp::CommitResult ZYppImpl::commit( int medianr_r, bool dry_run ) + * and target used for transact. */ + ZYppCommitResult ZYppImpl::commit( const ZYppCommitPolicy & policy_r ) { - MIL << "Attempt to commit (medianr " << medianr_r << ")" << endl; + MIL << "Attempt to commit (" << policy_r << ")" << endl; if (! _target) ZYPP_THROW( Exception("Target not initialized.") ); - ZYpp::CommitResult res; - - // must redirect to Target::Impl. This kind of commit should not be - // in the Target interface. - - res._result = _target->commit( pool(), medianr_r, - res._errors, res._remaining, res._srcremaining, dry_run ); + ZYppCommitResult res = _target->_pimpl->commit( pool(), policy_r ); - if (!dry_run) { + if (! policy_r.dryRun() ) { // reload new status from target - removeInstalledResolvables(); addResolvables( _target->resolvables(), true ); } - MIL << "Commit (medianr " << medianr_r << ") returned: " - << res._result - << " (errors " << res._errors.size() - << ", remaining " << res._remaining.size() - << ", srcremaining " << res._srcremaining.size() - << ")" << endl; - + MIL << "Commit (" << policy_r << ") returned: " + << res << endl; return res; } diff --git a/zypp/zypp_detail/ZYppImpl.h b/zypp/zypp_detail/ZYppImpl.h index 8d4f89d..e2c2e03 100644 --- a/zypp/zypp_detail/ZYppImpl.h +++ b/zypp/zypp_detail/ZYppImpl.h @@ -20,7 +20,8 @@ #include "zypp/Resolver.h" #include "zypp/Locale.h" #include "zypp/KeyRing.h" -#include "zypp/ZYppCommitResult.h" +#include "zypp/ZYppCommit.h" +#include "zypp/DiskUsageCounter.h" /////////////////////////////////////////////////////////////////// namespace zypp @@ -90,7 +91,7 @@ namespace zypp void finishTarget(); /** Commit changes and transactions. */ - ZYpp::CommitResult commit( int medianr_r, bool dry_run = false ); + ZYppCommitResult commit( const ZYppCommitPolicy & policy_r ); public: /** \todo Signal locale change. */