From 85f7b9b3c72cda2ca5fabc2a1de22a1f5c8451bd Mon Sep 17 00:00:00 2001 From: Michael Andres Date: Thu, 14 Aug 2008 12:04:31 +0000 Subject: [PATCH] - Let Selectable default to USER level. --- VERSION.cmake | 4 ++-- devel/devel.ma/NewPool.cc | 12 +++++++----- package/libzypp.changes | 7 +++++++ zypp/ui/Selectable.h | 16 ++++++++-------- zypp/ui/SelectableImpl.cc | 4 ++-- 5 files changed, 26 insertions(+), 17 deletions(-) diff --git a/VERSION.cmake b/VERSION.cmake index 7ab884d..f3fc64f 100644 --- a/VERSION.cmake +++ b/VERSION.cmake @@ -61,8 +61,8 @@ SET(LIBZYPP_MAJOR "5") SET(LIBZYPP_COMPATMINOR "5") SET(LIBZYPP_MINOR "5") -SET(LIBZYPP_PATCH "0") +SET(LIBZYPP_PATCH "1") # -# LAST RELEASED: 5.5.0 (5) +# LAST RELEASED: 5.5.1 (5) # (The number in parenthesis is LIBZYPP_COMPATMINOR) #======= diff --git a/devel/devel.ma/NewPool.cc b/devel/devel.ma/NewPool.cc index 015a8ac..09bde91 100644 --- a/devel/devel.ma/NewPool.cc +++ b/devel/devel.ma/NewPool.cc @@ -268,6 +268,11 @@ bool install() return true; } +void testcase() +{ + getZYpp()->resolver()->createSolverTestcase( "./solverTestcase" ); +} + /////////////////////////////////////////////////////////////////// struct DigestReceive : public callback::ReceiveReport @@ -523,11 +528,8 @@ try { /////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// - - ui::Selectable::Ptr item( ui::Selectable::get( "amarok" ) ); - item->setUpToDate(); - SEC << dump(item) << endl; - install(); + testcase(); + MIL << "FOOO" << endl; /////////////////////////////////////////////////////////////////// INT << "===[END]============================================" << endl << endl; diff --git a/package/libzypp.changes b/package/libzypp.changes index 603ffbb..7bef986 100644 --- a/package/libzypp.changes +++ b/package/libzypp.changes @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Thu Aug 14 14:03:27 CEST 2008 - ma@suse.de + +- Let Selectable default to USER level. +- revision 10850 +- version 5.5.1 (5) + +------------------------------------------------------------------- Wed Aug 13 21:01:25 CEST 2008 - ma@suse.de - Change Selectable API to support doing staus manipulation on diff --git a/zypp/ui/Selectable.h b/zypp/ui/Selectable.h index a729d30..d4e3bef 100644 --- a/zypp/ui/Selectable.h +++ b/zypp/ui/Selectable.h @@ -254,27 +254,27 @@ namespace zypp { return fate() == TO_INSTALL; } /** */ - bool setFate( Fate fate_r, ResStatus::TransactByValue causer_r /*= ResStatus::USER*/ ); + bool setFate( Fate fate_r, ResStatus::TransactByValue causer_r = ResStatus::USER ); /** Set the item to be installed (new- or re-install). */ - bool setToInstall( ResStatus::TransactByValue causer_r /*= ResStatus::USER*/ ) + bool setToInstall( ResStatus::TransactByValue causer_r = ResStatus::USER ) { return setFate( TO_INSTALL, causer_r ); } /** Take care the item gets installed if it is not. */ - bool setInstalled( ResStatus::TransactByValue causer_r /*= ResStatus::USER*/ ); + bool setInstalled( ResStatus::TransactByValue causer_r = ResStatus::USER ); /** Take care the item gets installed if it is not, or is older. */ - bool setUpToDate( ResStatus::TransactByValue causer_r /*= ResStatus::USER*/ ); + bool setUpToDate( ResStatus::TransactByValue causer_r = ResStatus::USER ); /** Set the item to be deleted (must be installed). */ - bool setToDelete( ResStatus::TransactByValue causer_r /*= ResStatus::USER*/ ) + bool setToDelete( ResStatus::TransactByValue causer_r = ResStatus::USER ) { return setFate( TO_DELETE, causer_r ); } /** Take care the item gets deleted if it is installed. */ - bool setDeleted( ResStatus::TransactByValue causer_r /*= ResStatus::USER*/ ); + bool setDeleted( ResStatus::TransactByValue causer_r = ResStatus::USER ); /** Set the item to stay unmodified. */ - bool unset( ResStatus::TransactByValue causer_r /*= ResStatus::USER*/ ) + bool unset( ResStatus::TransactByValue causer_r = ResStatus::USER ) { return setFate( UNMODIFIED, causer_r ); } //@} @@ -293,7 +293,7 @@ namespace zypp * Try to set a new Status. * Returns \c false if the transitions is not allowed. */ - bool setStatus( const Status state_r, ResStatus::TransactByValue causer_r /*= ResStatus::USER*/ ); + bool setStatus( const Status state_r, ResStatus::TransactByValue causer_r = ResStatus::USER ); /** Return who caused the modification. */ ResStatus::TransactByValue modifiedBy() const; diff --git a/zypp/ui/SelectableImpl.cc b/zypp/ui/SelectableImpl.cc index c24be18..a01221f 100644 --- a/zypp/ui/SelectableImpl.cc +++ b/zypp/ui/SelectableImpl.cc @@ -31,7 +31,7 @@ namespace zypp */ struct StatusHelper { - StatusHelper( const Selectable::Impl & impl ) + StatusHelper( const Selectable::Impl & impl, ResStatus::TransactByValue causer_r ) : _impl( impl ) , inst( impl.installedObj() ) , cand( impl.candidateObj() ) @@ -198,7 +198,7 @@ namespace zypp bool Selectable::Impl::setStatus( const Status state_r, ResStatus::TransactByValue causer_r ) { - StatusHelper self( *this ); + StatusHelper self( *this, causer_r ); switch ( state_r ) { -- 2.7.4