Mailinglist Archive: zypp-commit (301 mails)

< Previous Next >
[zypp-commit] r7642 - in /trunk/libzypp: cmake/modules/FindSatsolver.cmake devel/devel.ma/NewPool.cc zypp/CMakeLists.txt
  • From: mlandres@xxxxxxxxxxxxxxxx
  • Date: Thu, 25 Oct 2007 19:18:42 -0000
  • Message-id: <20071025191842.C42AB2D266@xxxxxxxxxxxxxxxx>
Author: mlandres
Date: Thu Oct 25 21:18:42 2007
New Revision: 7642

URL: http://svn.opensuse.org/viewcvs/zypp?rev=7642&view=rev
Log:
fix cmake FindSatsolver

Modified:
trunk/libzypp/cmake/modules/FindSatsolver.cmake
trunk/libzypp/devel/devel.ma/NewPool.cc
trunk/libzypp/zypp/CMakeLists.txt

Modified: trunk/libzypp/cmake/modules/FindSatsolver.cmake
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/cmake/modules/FindSatsolver.cmake?rev=7642&r1=7641&r2=7642&view=diff
==============================================================================
--- trunk/libzypp/cmake/modules/FindSatsolver.cmake (original)
+++ trunk/libzypp/cmake/modules/FindSatsolver.cmake Thu Oct 25 21:18:42 2007
@@ -8,24 +8,18 @@
set(SATSOLVER_INCLUDE_DIR)

FIND_PATH(SATSOLVER_INCLUDE_DIR satsolver/solvable.h
- /usr/include
+ ${CMAKE_INSTALL_PREFIX}/include
/usr/local/include
+ /usr/include
)

-FIND_FILE(SATSOLVER_LIBRARY libsatsolver.la
+FIND_LIBRARY(SATSOLVER_LIBRARY NAMES satsolver
PATHS
- /usr/lib64
- /usr/local/lib64
- /usr/lib
- /usr/local/lib
+ ${CMAKE_INSTALL_PREFIX}/lib
+ /usr/local/lib
+ /usr/lib
)

-#FIND_LIBRARY(SATSOLVER_LIBRARY NAMES satsolver
-# PATHS
-# /usr/lib
-# /usr/local/lib
-#)
-
if(SATSOLVER_INCLUDE_DIR AND SATSOLVER_LIBRARY)
MESSAGE( STATUS "satsolver found: includes in ${SATSOLVER_INCLUDE_DIR},
library in ${SATSOLVER_LIBRARY}")
set(SATSOLVER_FOUND TRUE)

Modified: trunk/libzypp/devel/devel.ma/NewPool.cc
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.ma/NewPool.cc?rev=7642&r1=7641&r2=7642&view=diff
==============================================================================
--- trunk/libzypp/devel/devel.ma/NewPool.cc (original)
+++ trunk/libzypp/devel/devel.ma/NewPool.cc Thu Oct 25 21:18:42 2007
@@ -440,25 +440,6 @@
{ return cont.find( val ) != cont.end(); }
}

-struct Xverscmp
-{
- Xverscmp( ostream * outs_r = 0 )
- : _outs( outs_r )
- {}
-
- bool operator()( const Edition & lhs, const Edition & rhs )
- {
- if ( _outs )
- {
- int res = lhs.compare( rhs );
- (*_outs) << lhs << " <> " << rhs << " = " << res << endl;
- }
- return true;
- }
-
- ostream * _outs;
-};
-
/******************************************************************
**
** FUNCTION NAME : main
@@ -468,6 +449,7 @@
{
//zypp::base::LogControl::instance().logfile( "log.restrict" );
INT << "===[START]==========================================" << endl;
+ zypp::base::LogControl::instance().logNothing();

setenv( "ZYPP_CONF", (sysRoot/"zypp.conf").c_str(), 1 );

@@ -475,6 +457,7 @@
RepoInfoList repos = repoManager.knownRepositories();
// SEC << "/Local/ROOT " << repos << endl;

+ // launch repos
for ( RepoInfoList::iterator it = repos.begin(); it != repos.end(); ++it )
{
RepoInfo & nrepo( *it );
@@ -490,28 +473,52 @@
SEC << "cleanCache" << endl;
repoManager.cleanCache( nrepo );
}
- SEC << "refreshMetadata" << endl;
- repoManager.refreshMetadata( nrepo, RepoManager::RefreshForced );
+ //SEC << "refreshMetadata" << endl;
+ //repoManager.refreshMetadata( nrepo, RepoManager::RefreshForced );
SEC << "buildCache" << endl;
repoManager.buildCache( nrepo );
}
+ }

- SEC << "createFromCache" << endl;
- Repository nrep( repoManager.createFromCache( nrepo ) );
- const zypp::ResStore & store( nrep.resolvables() );
- dumpPoolStats( SEC << "Store: " << endl, store.begin(), store.end() ) <<
endl;
- getZYpp()->addResolvables( store );
+ // create from cache:
+ std::list<Repository> repositories;
+
+ {
+ Measure x( "CREATE FROM CACHE" );
+ for ( RepoInfoList::iterator it = repos.begin(); it != repos.end(); ++it )
+ {
+ RepoInfo & nrepo( *it );
+ if ( ! nrepo.enabled() )
+ continue;
+
+ Measure x( "CREATE FROM CACHE "+nrepo.alias() );
+ Repository nrep( repoManager.createFromCache( nrepo ) );
+ const zypp::ResStore & store( nrep.resolvables() );
+ repositories.push_back( nrep );
+ }
+ }
+
+ // load pool:
+ {
+ Measure x( "LOAD POOL" );
+ for_( it, repositories.begin(), repositories.end() )
+ {
+ Measure x( "LOAD POOL "+(*it).info().alias() );
+ const zypp::ResStore & store( (*it).resolvables() );
+ getZYpp()->addResolvables( store );
+ }
}

- if ( 1 )
+
+ if ( 0 )
{
+ Measure x( "INIT TARGET" );
{
zypp::base::LogControl::TmpLineWriter shutUp;
getZYpp()->initTarget( sysRoot );
//getZYpp()->initTarget( "/" );
}
- SEC << "Added target " << endl;
- dumpPoolStats( SEC << "Store: " << endl,
+ dumpPoolStats( SEC << "TargetStore: " << endl,
getZYpp()->target()->resolvables().begin(),
getZYpp()->target()->resolvables().end() ) << endl;
}
@@ -520,22 +527,6 @@
USR << "pool: " << pool << endl;

{
- Measure x( "Cross pool edition compare" );
- //ofstream out( "verscmp.new" );
-
- std::set<Edition> editions;
- for_( it, pool.begin(), pool.end() )
- {
- editions.insert( (*it)->edition() );
- }
- SEC << "Num Editions " << editions.size() << endl;
- for ( unsigned i = 5; i; --i )
- {
- Measure x( "pass " );
- invokeOnEach( editions.begin(), editions.end(),
- editions.begin(), editions.end(),
- Xverscmp() );
- }
}

//std::for_each( pool.begin(), pool.end(), Xprint() );

Modified: trunk/libzypp/zypp/CMakeLists.txt
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/CMakeLists.txt?rev=7642&r1=7641&r2=7642&view=diff
==============================================================================
--- trunk/libzypp/zypp/CMakeLists.txt (original)
+++ trunk/libzypp/zypp/CMakeLists.txt Thu Oct 25 21:18:42 2007
@@ -674,11 +674,13 @@
)

SET( zypp_sat_SRCS
+# sat/Pool.cc
sat/SATResolver.cc
)

SET( zypp_sat_HEADERS
- sat/SATResolver.cc
+# sat/Pool.h
+ sat/SATResolver.h
)

INSTALL( FILES
@@ -1128,6 +1130,7 @@

# override some defaults
SET_LOGGROUP( "xmlstore" ${zypp_target_store_xml_SRCS} )
+SET_LOGGROUP( "satsolver" ${zypp_sat_SRCS} )
#SET_LOGGROUP( "group" ${zypp_target_rpm_SRCS} )
#SET_LOGGROUP( "group" ${zypp_parser_yum2_SRCS} )
#SET_LOGGROUP( "group" ${zypp_capability_SRCS} )
@@ -1174,7 +1177,7 @@
TARGET_LINK_LIBRARIES(zypp ${LIBXML_LIBRARY} )
TARGET_LINK_LIBRARIES(zypp ${SQLITE_LIBRARY} )
TARGET_LINK_LIBRARIES(zypp ${ZLIB_LIBRARY} )
-TARGET_LINK_LIBRARIES(zypp satsolver )
+TARGET_LINK_LIBRARIES(zypp ${SATSOLVER_LIBRARY} )

INSTALL(TARGETS zypp LIBRARY DESTINATION ${LIB_INSTALL_DIR} )


--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages