Author: mlandres Date: Sun Jun 1 23:40:03 2008 New Revision: 10296 URL: http://svn.opensuse.org/viewcvs/zypp?rev=10296&view=rev Log: - Revert inappropriate Selectable cleanup. Fix Selectable status computation. Unmaintained packages were wrongly reported as unsinstalled. (bnc #394630) Modified: branches/SuSE-Linux-11_0-Branch/libzypp/VERSION.cmake branches/SuSE-Linux-11_0-Branch/libzypp/package/libzypp.changes branches/SuSE-Linux-11_0-Branch/libzypp/zypp/ui/SelectableImpl.cc Modified: branches/SuSE-Linux-11_0-Branch/libzypp/VERSION.cmake URL: http://svn.opensuse.org/viewcvs/zypp/branches/SuSE-Linux-11_0-Branch/libzypp/VERSION.cmake?rev=10296&r1=10295&r2=10296&view=diff ============================================================================== --- branches/SuSE-Linux-11_0-Branch/libzypp/VERSION.cmake (original) +++ branches/SuSE-Linux-11_0-Branch/libzypp/VERSION.cmake Sun Jun 1 23:40:03 2008 @@ -47,4 +47,4 @@ SET(LIBZYPP_MAJOR "4") SET(LIBZYPP_MINOR "25") SET(LIBZYPP_COMPATMINOR "24") -SET(LIBZYPP_PATCH "1") +SET(LIBZYPP_PATCH "2") Modified: branches/SuSE-Linux-11_0-Branch/libzypp/package/libzypp.changes URL: http://svn.opensuse.org/viewcvs/zypp/branches/SuSE-Linux-11_0-Branch/libzypp/package/libzypp.changes?rev=10296&r1=10295&r2=10296&view=diff ============================================================================== --- branches/SuSE-Linux-11_0-Branch/libzypp/package/libzypp.changes (original) +++ branches/SuSE-Linux-11_0-Branch/libzypp/package/libzypp.changes Sun Jun 1 23:40:03 2008 @@ -1,4 +1,13 @@ ------------------------------------------------------------------- +Sun Jun 1 23:14:34 CEST 2008 - - ma@suse.de + +- Revert inappropriate Selectable cleanup. Fix Selectable + status computation. Unmaintained packages were wrongly + reported as unsinstalled. (bnc #394630) +- version 4.25.2 +- revision 10296 + +------------------------------------------------------------------- Wed May 28 18:54:27 CEST 2008 - ma@suse.de - Reenable diskusage calculation (bnc #395051) Modified: branches/SuSE-Linux-11_0-Branch/libzypp/zypp/ui/SelectableImpl.cc URL: http://svn.opensuse.org/viewcvs/zypp/branches/SuSE-Linux-11_0-Branch/libzypp/zypp/ui/SelectableImpl.cc?rev=10296&r1=10295&r2=10296&view=diff ============================================================================== --- branches/SuSE-Linux-11_0-Branch/libzypp/zypp/ui/SelectableImpl.cc (original) +++ branches/SuSE-Linux-11_0-Branch/libzypp/zypp/ui/SelectableImpl.cc Sun Jun 1 23:40:03 2008 @@ -37,6 +37,8 @@ , cand( impl.candidateObj() ) {} + typedef Selectable::Impl::available_const_iterator available_const_iterator; + // // Queries // @@ -60,7 +62,7 @@ // void resetTransactingCandidates() const { - for ( Selectable::Impl::available_const_iterator it = _impl.availableBegin(); + for ( available_const_iterator it = _impl.availableBegin(); it != _impl.availableEnd(); ++it ) { (*it).status().setTransact( false, ResStatus::USER ); @@ -68,7 +70,7 @@ } void unlockCandidates() const { - for ( Selectable::Impl::available_const_iterator it = _impl.availableBegin(); + for ( available_const_iterator it = _impl.availableBegin(); it != _impl.availableEnd(); ++it ) { (*it).status().setTransact( false, ResStatus::USER ); @@ -77,7 +79,7 @@ } void lockCandidates() const { - for ( Selectable::Impl::available_const_iterator it = _impl.availableBegin(); + for ( available_const_iterator it = _impl.availableBegin(); it != _impl.availableEnd(); ++it ) { (*it).status().setTransact( false, ResStatus::USER ); @@ -90,7 +92,7 @@ if ( cand ) { if ( inst ) { - inst.status().resetTransact( ResStatus::USER ); + inst.status().setTransact( false, ResStatus::USER ); inst.status().setLock ( false, ResStatus::USER ); if ( ! cand->installOnly() ) { @@ -102,7 +104,7 @@ } } unlockCandidates(); - return cand.status().setToBeInstalled( ResStatus::USER ); + return cand.status().setTransact( true, ResStatus::USER ); } return false; } @@ -113,7 +115,7 @@ { resetTransactingCandidates(); inst.status().setLock( false, ResStatus::USER ); - return inst.status().setToBeUninstalled( ResStatus::USER ); + return inst.status().setTransact( true, ResStatus::USER ); } return false; } @@ -121,7 +123,7 @@ bool unset() const { if ( inst ) { - inst.status().resetTransact( ResStatus::USER ); + inst.status().setTransact( false, ResStatus::USER ); inst.status().setLock( false, ResStatus::USER ); } unlockCandidates(); @@ -132,7 +134,7 @@ { if ( inst ) { resetTransactingCandidates(); - inst.status().resetTransact( ResStatus::USER ); + inst.status().setTransact( false, ResStatus::USER ); return inst.status().setLock( true, ResStatus::USER ); } else return false; @@ -183,13 +185,15 @@ if ( !installedObj() && allCandidatesLocked() ) return S_Taboo; - // non packages are handled differently - if ( ! isKind<Package>(cand.resolvable()) ) - { - return( cand.status().isSatisfied() ? S_KeepInstalled : S_NoInst ); - } + // KEEP state: non packages count as installed if they are satisfied. + if ( installedObj() ) + return S_KeepInstalled; + + if ( kind() != ResKind::package + && cand.status().isSatisfied() ) // no installed, so we must have candidate + return S_KeepInstalled; - return( installedObj() ? S_KeepInstalled : S_NoInst ); + return S_NoInst; } bool Selectable::Impl::setStatus( const Status state_r ) -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org