Mailinglist Archive: zypp-devel (53 mails)

< Previous Next >
[zypp-devel] Zypp stack and RPM 4.6
  • From: Lorenzo Villani <lvillani@xxxxxxxxxxxxxxx>
  • Date: Fri, 17 Oct 2008 13:25:36 +0200
  • Message-id: <200810171325.43618.lvillani@xxxxxxxxxxxxxxx>
Hi,
In the progress of making packages of the ZYpp stack on Fedora (yes, the
package review is progressing slowly) I encountered several problems compiling
the ZYpp stack against RPM 4.5.90 and RPM 4.6 rc1 (the ones from rpm.org).
I have zero-knowledge of sat-solver, libzypp and zypper codebase but I was
able to create a patch to make sat-solver compile against that particular
version of RPM, however libzypp codebase is very complex and I wasn't able to
make a patch for it.
Are there any plans to port the stable codebase to RPM 4.6? This is slowing
the possible adoption of ZYpp stack in Fedora even further (next Fedora
release - on November 25th - will come with RPM 4.6 by default).

PS: I attached my sat-solver-0.9.5-rpm4.5.90 patch
and sat-solver-db-corruption-fix.patch made with the help of Michael
Schroeder

Regards
--
Lorenzo Villani
Blog: http//blog.binaryhelix.net
LinkedIn profile: http://www.linkedin.com/in/lorenzovillani
diff -Naur sat-solver-0.9.4.orig/CMakeLists.txt sat-solver-0.9.4/CMakeLists.txt
--- sat-solver-0.9.4.orig/CMakeLists.txt 2008-10-15 17:49:02.000000000
+0200
+++ sat-solver-0.9.4/CMakeLists.txt 2008-10-16 11:09:55.000000000 +0200
@@ -33,7 +33,7 @@
INCLUDE( ${CMAKE_SOURCE_DIR}/VERSION.cmake )

FIND_PACKAGE(EXPAT REQUIRED)
-FIND_LIBRARY(RPMDB_LIBRARY NAMES rpmdb)
+FIND_LIBRARY(RPM_LIBRARY NAMES rpm)
FIND_LIBRARY(ZLIB_LIBRARY NAMES z)

SET( PACKAGE "satsolver" )
diff -Naur sat-solver-0.9.4.orig/tools/CMakeLists.txt
sat-solver-0.9.4/tools/CMakeLists.txt
--- sat-solver-0.9.4.orig/tools/CMakeLists.txt 2008-05-27 14:29:34.000000000
+0200
+++ sat-solver-0.9.4/tools/CMakeLists.txt 2008-10-16 11:10:37.000000000
+0200
@@ -15,11 +15,11 @@
)

ADD_EXECUTABLE( rpmdb2solv ${rpmdb2solv_REPOS} )
-TARGET_LINK_LIBRARIES( rpmdb2solv satsolver ${RPMDB_LIBRARY})
+TARGET_LINK_LIBRARIES( rpmdb2solv satsolver ${RPM_LIBRARY})

SET(rpms2solv_REPOS rpms2solv.c repo_rpmdb.h repo_rpmdb.c repo_write.c
common_write.c )
ADD_EXECUTABLE( rpms2solv ${rpms2solv_REPOS} )
-TARGET_LINK_LIBRARIES( rpms2solv satsolver ${RPMDB_LIBRARY})
+TARGET_LINK_LIBRARIES( rpms2solv satsolver ${RPM_LIBRARY})

SET(rpmmd2solv_REPOS rpmmd2solv.c repo_rpmmd.h repo_rpmmd.c repo_write.c
common_write.c )
ADD_EXECUTABLE( rpmmd2solv ${rpmmd2solv_REPOS} )
diff -Naur sat-solver-0.9.4.orig/tools/repo_rpmdb.c
sat-solver-0.9.4/tools/repo_rpmdb.c
--- sat-solver-0.9.4.orig/tools/repo_rpmdb.c 2008-10-16 11:01:43.000000000
+0200
+++ sat-solver-0.9.4/tools/repo_rpmdb.c 2008-10-16 11:10:59.000000000 +0200
@@ -22,7 +22,7 @@
#include <unistd.h>
#include <assert.h>

-#include <rpm/db.h>
+#include <db4/db.h>

#include "pool.h"
#include "repo.h"
diff -Naur sat-solver-0.9.4.orig/tools/repo_rpmdb.c
sat-solver-0.9.4/tools/repo_rpmdb.c
--- sat-solver-0.9.4.orig/tools/repo_rpmdb.c 2008-08-24 21:03:10.000000000
+0200
+++ sat-solver-0.9.4/tools/repo_rpmdb.c 2008-08-24 21:03:36.000000000 +0200
@@ -1222,7 +1222,7 @@
exit(1);
}
snprintf(dbpath, PATH_MAX, "%s/var/lib/rpm", rootdir);
- if (dbenv->open(dbenv, dbpath, DB_CREATE|DB_PRIVATE|DB_INIT_MPOOL, 0))
+ if (dbenv->open(dbenv, dbpath, DB_CREATE|DB_INIT_MPOOL|DB_INIT_CDB, 0))
{
perror("dbenv open");
exit(1);
< Previous Next >