Author: mlandres
Date: Thu Mar 6 13:44:43 2008
New Revision: 9031
URL: http://svn.opensuse.org/viewcvs/zypp?rev=9031&view=rev
Log:
Do not filter any installed solvables.
Modified:
trunk/libzypp/devel/devel.ma/MaTest.cc
trunk/libzypp/devel/devel.ma/NewPool.cc
trunk/libzypp/package/libzypp.changes
trunk/libzypp/zypp/Repository.cc
trunk/libzypp/zypp/sat/detail/PoolImpl.cc
trunk/libzypp/zypp/sat/detail/PoolImpl.h
Modified: trunk/libzypp/devel/devel.ma/MaTest.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.ma/MaTest.cc?rev=9031&r1=9030&r2=9031&view=diff
==============================================================================
--- trunk/libzypp/devel/devel.ma/MaTest.cc (original)
+++ trunk/libzypp/devel/devel.ma/MaTest.cc Thu Mar 6 13:44:43 2008
@@ -1,60 +1,38 @@
#include <iostream>
-
-#include
-#include
-#include
-#include
-#include
-
-#include "Tools.h"
-#include "FakePool.h"
-
-#include
-#include
-
-#include "zypp/ZYppFactory.h"
-#include "zypp/ResPoolProxy.h"
-#include "zypp/ResTraits.h"
-#include "zypp/ResPool.h"
-#include "zypp/Package.h"
+#include
+#include
+#include
using std::endl;
+using std::cout;
using namespace zypp;
-///////////////////////////////////////////////////////////////////
-
-void setup( QVBox & top, int argc, char **argv )
+/******************************************************************
+**
+** FUNCTION NAME : main
+** FUNCTION TYPE : int
+*/
+int main( int argc, const char * argv[] )
{
- if ( ! argc )
- return;
+ --argc; ++argv; // skip arg 0
+ sat::Pool satpool( sat::Pool::instance() );
- MIL << argv[0] << endl;
-}
+ for ( ; argc; --argc, ++argv )
+ {
+ cout << "Read: " << argv[0] << endl;
+ satpool.addRepoSolv( argv[0] );
+ }
+
+ cout << "Done: " << satpool << endl;
+
+ if ( getenv("VERBOSE") )
+ {
+ for_( it, satpool.solvablesBegin(), satpool.solvablesEnd() )
+ {
+ cout << dump(*it) << endl;
+ }
+ }
-///////////////////////////////////////////////////////////////////
-
-int main( int argc, char **argv )
-{
- base::LogControl::instance().logfile( "-" );
- INT << "===[START]==========================================" << endl;
-
- QApplication app( argc, argv );
- QVBox top;
-
- --argc;
- ++argv;
- setup( top, argc, argv );
-
- QPushButton quit( "Quit", &top );
- QObject::connect( &quit,SIGNAL(clicked()), &app, SLOT(quit()) );
- app.setMainWidget( &top );
- top.show();
- INT << "===[LOOP]==========================================" << endl;
- return app.exec();
+ return 0;
}
-///////////////////////////////////////////////////////////////////
-//#include "QPool.moc"
-///////////////////////////////////////////////////////////////////
-
-
Modified: trunk/libzypp/devel/devel.ma/NewPool.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.ma/NewPool.cc?rev=9031&r1=9030&r2=9031&view=diff
==============================================================================
--- trunk/libzypp/devel/devel.ma/NewPool.cc (original)
+++ trunk/libzypp/devel/devel.ma/NewPool.cc Thu Mar 6 13:44:43 2008
@@ -443,7 +443,7 @@
*/
int main( int argc, char * argv[] )
try {
- //zypp::base::LogControl::instance().logfile( "log.restrict" );
+ zypp::base::LogControl::instance().logToStdErr();
INT << "===[START]==========================================" << endl;
sat::Pool satpool( sat::Pool::instance() );
Modified: trunk/libzypp/package/libzypp.changes
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/package/libzypp.changes?rev=9031&r1=9030&r2=9031&view=diff
==============================================================================
--- trunk/libzypp/package/libzypp.changes (original)
+++ trunk/libzypp/package/libzypp.changes Thu Mar 6 13:44:43 2008
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Thu Mar 6 13:42:53 CET 2008 - ma@suse.de
+
+- Do not filter any installed solvables.
+- revision 9031
+
+-------------------------------------------------------------------
Wed Mar 5 11:33:26 CET 2008 - ma@suse.de
- Try to rebuild broken solv files in Target::load.
Modified: trunk/libzypp/zypp/Repository.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Repository.cc?rev=9031&r1=9030&r2=9031&view=diff
==============================================================================
--- trunk/libzypp/zypp/Repository.cc (original)
+++ trunk/libzypp/zypp/Repository.cc Thu Mar 6 13:44:43 2008
@@ -132,7 +132,7 @@
ZYPP_THROW( Exception( _("Can't open solv-file: ")+file_r.asString() ) );
}
- if ( myPool()._addSolv( _repo, file ) != 0 )
+ if ( myPool()._addSolv( _repo, file, isSystemRepo() ) != 0 )
{
ZYPP_THROW( Exception( _("Error reading solv-file: ")+file_r.asString() ) );
}
Modified: trunk/libzypp/zypp/sat/detail/PoolImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/sat/detail/PoolImpl.cc?rev=9031&r1=9030&r2=9031&view=diff
==============================================================================
--- trunk/libzypp/zypp/sat/detail/PoolImpl.cc (original)
+++ trunk/libzypp/zypp/sat/detail/PoolImpl.cc Thu Mar 6 13:44:43 2008
@@ -94,6 +94,7 @@
PoolImpl::PoolImpl()
: _pool( ::pool_create() )
{
+ MIL << "Creating sat-pool." << endl;
if ( ! _pool )
{
ZYPP_THROW( Exception( _("Can not create sat-pool.") ) );
@@ -103,9 +104,6 @@
::pool_setdebuglevel( _pool, verbose ? 5 : 1 );
::pool_setdebugcallback( _pool, logSat, NULL );
- // set pool architecture
- ::pool_setarch( _pool, ZConfig::instance().systemArchitecture().asString().c_str() );
-
// set namespace callback
_pool->nscallback = &nsCallback;
_pool->nscallbackdata = (void*)this;
@@ -153,8 +151,8 @@
{
if ( _watcher.remember( _serial ) )
{
- /* nothing to do here, but _watcher MUST remember... */
- // set pool architecture
+ // After repo/solvable add/remove:
+ // set pool architecture
::pool_setarch( _pool, ZConfig::instance().systemArchitecture().asString().c_str() );
}
if ( ! _pool->whatprovides )
@@ -167,11 +165,11 @@
///////////////////////////////////////////////////////////////////
- int PoolImpl::_addSolv( ::_Repo * repo_r, FILE * file_r )
+ int PoolImpl::_addSolv( ::_Repo * repo_r, FILE * file_r, bool isSystemRepo_r )
{
setDirty(__FUNCTION__, repo_r->name );
int ret = ::repo_add_solv( repo_r , file_r );
- if ( ret == 0 )
+ if ( ret == 0 && ! isSystemRepo_r )
{
// Filter out unwanted archs
std::setdetail::IdType sysids;
Modified: trunk/libzypp/zypp/sat/detail/PoolImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/sat/detail/PoolImpl.h?rev=9031&r1=9030&r2=9031&view=diff
==============================================================================
--- trunk/libzypp/zypp/sat/detail/PoolImpl.h (original)
+++ trunk/libzypp/zypp/sat/detail/PoolImpl.h Thu Mar 6 13:44:43 2008
@@ -101,8 +101,11 @@
eraseRepoInfo( repo_r );
}
- /** Adding solv file to a repo. */
- int _addSolv( ::_Repo * repo_r, FILE * file_r );
+ /** Adding solv file to a repo.
+ * Except for \c isSystemRepo_r, solvables of incompatible architecture
+ * are filtered out.
+ */
+ int _addSolv( ::_Repo * repo_r, FILE * file_r, bool isSystemRepo_r = false );
/** Adding Solvables to a repo. */
detail::SolvableIdType _addSolvables( ::_Repo * repo_r, unsigned count_r )
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org