[zypp-commit] r11946 - in /trunk/sat-solver: CMakeLists.txt tools/repo_rpmdb.c

Author: mlschroe Date: Wed Dec 17 19:06:30 2008 New Revision: 11946 URL: http://svn.opensuse.org/viewcvs/zypp?rev=11946&view=rev Log: - fix fedora builds (bnc#444211) (cmake needs to be called with -DFEDORA:=1) Modified: trunk/sat-solver/CMakeLists.txt trunk/sat-solver/tools/repo_rpmdb.c Modified: trunk/sat-solver/CMakeLists.txt URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/CMakeLists.txt?rev=119... ============================================================================== --- trunk/sat-solver/CMakeLists.txt (original) +++ trunk/sat-solver/CMakeLists.txt Wed Dec 17 19:06:30 2008 @@ -35,7 +35,13 @@ FIND_PACKAGE(Check REQUIRED) FIND_PACKAGE(ZLIB REQUIRED) +IF ( FEDORA ) +MESSAGE(STATUS "Building for Fedora") +ADD_DEFINITIONS( -DFEDORA ) +FIND_LIBRARY(RPMDB_LIBRARY NAMES rpm) +ELSE ( FEDORA ) FIND_LIBRARY(RPMDB_LIBRARY NAMES rpmdb) +ENDIF ( FEDORA) SET( PACKAGE "satsolver" ) SET( VERSION "${LIBSATSOLVER_MAJOR}.${LIBSATSOLVER_MINOR}.${LIBSATSOLVER_PATCH}" ) Modified: trunk/sat-solver/tools/repo_rpmdb.c URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/tools/repo_rpmdb.c?rev... ============================================================================== --- trunk/sat-solver/tools/repo_rpmdb.c (original) +++ trunk/sat-solver/tools/repo_rpmdb.c Wed Dec 17 19:06:30 2008 @@ -22,7 +22,11 @@ #include <unistd.h> #include <assert.h> +#ifdef FEDORA +#include <db4/db.h> +#else #include <rpm/db.h> +#endif #include "pool.h" #include "repo.h" @@ -1274,7 +1278,12 @@ exit(1); } snprintf(dbpath, PATH_MAX, "%s/var/lib/rpm", rootdir); + /* should look in /usr/lib/rpm/macros instead, but we want speed... */ +#ifdef FEDORA + if (dbenv->open(dbenv, dbpath, DB_CREATE|DB_INIT_CDB|DB_INIT_MPOOL, 0)) +#else if (dbenv->open(dbenv, dbpath, DB_CREATE|DB_PRIVATE|DB_INIT_MPOOL, 0)) +#endif { perror("dbenv open"); exit(1); -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org
participants (1)
-
mlschroe@svn.opensuse.org