[zypp-commit] r11845 - in /trunk/libzypp: VERSION.cmake devel/devel.ma/Iorder.cc package/libzypp.changes zypp/sat/WhatObsoletes.h zypp/solver/detail/InstallOrder.cc
![](https://seccdn.libravatar.org/avatar/1a5a039cbdb74b7bb361ba2e9d30cb91.jpg?s=120&d=mm&r=g)
Author: mlandres
Date: Mon Dec 1 19:42:47 2008
New Revision: 11845
URL: http://svn.opensuse.org/viewcvs/zypp?rev=11845&view=rev
Log:
- Fix install order computation losing some installed packages
pre-requirements. (bnc #439802)
Modified:
trunk/libzypp/VERSION.cmake
trunk/libzypp/devel/devel.ma/Iorder.cc
trunk/libzypp/package/libzypp.changes
trunk/libzypp/zypp/sat/WhatObsoletes.h
trunk/libzypp/zypp/solver/detail/InstallOrder.cc
Modified: trunk/libzypp/VERSION.cmake
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/VERSION.cmake?rev=11845&r1=11844&r2=11845&view=diff
==============================================================================
--- trunk/libzypp/VERSION.cmake (original)
+++ trunk/libzypp/VERSION.cmake Mon Dec 1 19:42:47 2008
@@ -61,8 +61,8 @@
SET(LIBZYPP_MAJOR "5")
SET(LIBZYPP_COMPATMINOR "23")
SET(LIBZYPP_MINOR "24")
-SET(LIBZYPP_PATCH "4")
+SET(LIBZYPP_PATCH "5")
#
-# LAST RELEASED: 5.24.4 (23)
+# LAST RELEASED: 5.24.5 (23)
# (The number in parenthesis is LIBZYPP_COMPATMINOR)
#=======
Modified: trunk/libzypp/devel/devel.ma/Iorder.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.ma/Iorder.cc?rev=11845&r1=11844&r2=11845&view=diff
==============================================================================
--- trunk/libzypp/devel/devel.ma/Iorder.cc (original)
+++ trunk/libzypp/devel/devel.ma/Iorder.cc Mon Dec 1 19:42:47 2008
@@ -5,12 +5,50 @@
#include "zypp/pool/GetResolvablesToInsDel.h"
-Pathname mroot( "/tmp/Bb" );
-TestSetup test( mroot, Arch_ppc64 );
+void Dbg( ui::Selectable::Ptr s )
+{
+ SEC << dump(s) << endl;
+ if ( s->installedObj() )
+ {
+ PoolItem pi( s->installedObj() );
+ DBG << pi.satSolvable().obsoletes() << endl;
+ sat::WhatObsoletes obs( pi );
+ INT << "WhatObsoletes " << pi << " " << obs << endl;
+ }
+ if ( s->candidateObj() )
+ {
+ PoolItem pi( s->candidateObj() );
+ DBG << pi.satSolvable().obsoletes() << endl;
+ sat::WhatObsoletes obs( pi );
+ INT << "WhatObsoletes " << pi << " " << obs << endl;
+ }
+
+}
+
+///////////////////////////////////////////////////////////////////
+
+static std::string appname( "ToolIorder" );
+
+void message( const std::string & msg_r )
+{
+ cerr << "*** " << msg_r << endl;
+}
+
+int usage( const std::string & msg_r = std::string(), int exit_r = 100 )
+{
+ if ( ! msg_r.empty() )
+ {
+ cerr << endl;
+ message( msg_r );
+ cerr << endl;
+ }
+ cerr << "Usage: " << appname << "[OPTIONS] TESTCASE" << endl;
+ cerr << " Load testcase and analyze install order." << endl;
+ return exit_r;
+}
+
+///////////////////////////////////////////////////////////////////
-#define LCStack "IOrder::Stack"
-#define LCCache "IOrder::Cache"
-#define LCVerbose "IOrder::Verbose"
bool progressReceiver( const ProgressData & v )
{
@@ -18,6 +56,12 @@
return true;
}
+///////////////////////////////////////////////////////////////////
+
+#define LCStack "IOrder::Stack"
+#define LCCache "IOrder::Cache"
+#define LCVerbose "IOrder::Verbose"
+
struct RunnableCache
{
typedef std::tr1::unordered_mapsat::Solvable,TriBool CacheType;
@@ -177,7 +221,7 @@
if ( _stack.back() == solv_r )
{
_stack.pop_back();
- _ltag = str::form( "[%0l4u]", _stack.size() );
+ _ltag = str::form( "[%04lu]", _stack.size() );
return true;
}
// stack corrupted?
@@ -226,7 +270,7 @@
USR << "Solve " << run++ << endl;
bool rres = false;
{
- //zypp::base::LogControl::TmpLineWriter shutUp;
+ zypp::base::LogControl::TmpLineWriter shutUp;
rres = getZYpp()->resolver()->resolvePool();
}
if ( ! rres )
@@ -239,34 +283,19 @@
return true;
}
-bool verify()
+void display( const pool::GetResolvablesToInsDel & collect, std::set<IdString> interested )
{
- bool rres = solve();
- ResPool pool( test.pool() );
- for_( it, make_filter_beginresfilter::ByTransact(pool),
- make_filter_endresfilter::ByTransact(pool) )
+ if ( ! interested.empty() )
{
- if ( it->status().transacts() &&
- it->status().isBySolver() )
+ USR << "======================================================================" << endl;
+ USR << "=== INTERESTED" << endl;
+ USR << "======================================================================" << endl;
+ for_( it, interested.begin(), interested.end() )
{
- WAR << "MISSING " << *it << endl;
+ MIL << dump(ui::Selectable::get( *it )) << endl;
}
}
- return rres;
-}
-
-inline void save()
-{
- test.poolProxy().saveState();
-}
-
-inline void restore()
-{
- test.poolProxy().restoreState();
-}
-void display( const pool::GetResolvablesToInsDel & collect, std::set<IdString> interested )
-{
USR << "======================================================================" << endl;
USR << "=== DELETE" << endl;
USR << "======================================================================" << endl;
@@ -331,6 +360,13 @@
rcache.clear();
+ for_( it, p->installedBegin(), p->installedEnd() )
+ {
+ if ( ! rcache.isInstallable( *it ) )
+ {
+ USR << "FAILED OLD " << *it << endl;
+ }
+ }
sat::WhatObsoletes obs( *it );
for_( it, obs.begin(), obs.end() )
{
@@ -340,6 +376,7 @@
}
}
+
if ( ! rcache.isInstallable( *it ) )
{
USR << "FAILED INS " << *it << endl;
@@ -371,48 +408,69 @@
int main( int argc, char * argv[] )
{
INT << "===[START]==========================================" << endl;
+ appname = Pathname::basename( argv[0] );
+ --argc;
+ ++argv;
+
+ if ( ! argc )
+ {
+ return usage();
+ }
- Pathname mroot( "/tmp/Bb" );
- TestSetup test( mroot, Arch_i686 ); // <<< arch
+ ///////////////////////////////////////////////////////////////////
- ResPool pool( test.pool() );
+ Pathname mtest( "/suse/ma/BUGS/439802/bug439802/YaST2/solverTestcase" );
+ Arch march( Arch_ppc64 );
+
+ while ( argc )
+ {
+ --argc;
+ ++argv;
+ }
+
+ if ( mtest.empty() )
+ {
+ return usage( "Missing Testcase", 102 );
+ }
+
+ ///////////////////////////////////////////////////////////////////
+
+ TestSetup test( march );
+ ResPool pool( test.pool() );
sat::Pool satpool( test.satpool() );
{
zypp::base::LogControl::TmpLineWriter shutUp;
test.loadTarget();
- test.loadTestcaseRepos( "/suse/ma/BUGS/153548/YaST2/solverTestcase" ); // <<< repos
+ test.loadTestcaseRepos( mtest ); // <<< repos
}
- save();
-
+ test.poolProxy().saveState();
{ // <<< transaction
zypp::base::LogControl::TmpLineWriter shutUp;
- getPi<Product>( "SUSE_SLED" ).status().setTransact( true, ResStatus::USER );
- getPi<Package>( "kernel-pae" ).status().setTransact( true, ResStatus::USER );
- getPi<Package>( "sled-release" ).status().setTransact( true, ResStatus::USER );
- getPi<Pattern>( "apparmor" ).status().setTransact( true, ResStatus::USER );
- getPi<Pattern>( "desktop-base" ).status().setTransact( true, ResStatus::USER );
- getPi<Pattern>( "desktop-gnome" ).status().setTransact( true, ResStatus::USER );
- getPi<Pattern>( "x11" ).status().setTransact( true, ResStatus::USER );
+ getPi<Product>( "SUSE_SLES", Edition("11-0"), Arch_ppc64 ).status().setTransact( true, ResStatus::USER );
+ vdumpPoolStats( USR << "Transacting:"<< endl,
+ make_filter_beginresfilter::ByTransact(pool),
+ make_filter_endresfilter::ByTransact(pool) ) << endl;
upgrade();
}
vdumpPoolStats( USR << "Transacting:"<< endl,
make_filter_beginresfilter::ByTransact(pool),
make_filter_endresfilter::ByTransact(pool) ) << endl;
+
pool::GetResolvablesToInsDel collect( pool, pool::GetResolvablesToInsDel::ORDER_BY_MEDIANR );
- USR << ui::Selectable::get( "libtiff" ) << endl;
- restore();
+
+ test.poolProxy().restoreState();
{
- //base::LogControl::TmpLineWriter shutUp( new log::FileLineWriter( "iorder.log" ) );
+ base::LogControl::TmpLineWriter shutUp( new log::FileLineWriter( "iorder.log" ) );
std::set<IdString> interested;
- interested.insert( IdString("libtiff") );
+ //interested.insert( IdString("fillup") );
display( collect, interested );
}
- INT << "===[END]============================================" << endl << endl;
+ INT << "===[END]============================================" << endl << endl;
zypp::base::LogControl::TmpLineWriter shutUp;
return 0;
}
Modified: trunk/libzypp/package/libzypp.changes
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/package/libzypp.changes?rev=11845&r1=11844&r2=11845&view=diff
==============================================================================
--- trunk/libzypp/package/libzypp.changes (original)
+++ trunk/libzypp/package/libzypp.changes Mon Dec 1 19:42:47 2008
@@ -1,4 +1,12 @@
-------------------------------------------------------------------
+Mon Dec 1 19:38:24 CET 2008 - ma@suse.de
+
+- Fix install order computation losing some installed packages
+ pre-requirements. (bnc #439802)
+- revision 11845
+- version 5.24.5 (23)
+
+-------------------------------------------------------------------
Fri Nov 28 16:33:56 CET 2008 - ma@suse.de
- Prune soft locks to prevent installation but not update of
Modified: trunk/libzypp/zypp/sat/WhatObsoletes.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/sat/WhatObsoletes.h?rev=11845&r1=11844&r2=11845&view=diff
==============================================================================
--- trunk/libzypp/zypp/sat/WhatObsoletes.h (original)
+++ trunk/libzypp/zypp/sat/WhatObsoletes.h Mon Dec 1 19:42:47 2008
@@ -33,6 +33,8 @@
*
* \code
* \endcode
+ *
+ * \todo Add flag to also add any installed version to the containter.
*/
class WhatObsoletes : public SolvIterMixin
participants (1)
-
mlandres@svn.opensuse.org