]> code.ossystems Code Review - openembedded-core.git/commitdiff
sat-solver: Add workaround for RPM 5 db construction
authorMark Hatle <mark.hatle@windriver.com>
Wed, 16 Mar 2011 15:28:08 +0000 (10:28 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 16 Mar 2011 16:41:47 +0000 (16:41 +0000)
The first time the database is created on an RPM5 system it works
correctly.  However any subsequent rebuilds cause an empty database to
occur.

The following is from Michael Schroeder <mls@suse.de>:
> rpmdb2solv contains a hack that makes it use the unchanged already
> converted packages. To do this, it needs to get the database id
> for every installed packages by reading the "Name" index. This
> somehow doesn't seem to work with rpm5.
>
> As a workaround you can add a "ref = 0;" line at the top of the
> repo_add_rpmdb() function in ext/repo_rpmdb.c.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
meta/recipes-extended/sat-solver/sat-solver/rpm5-solvdb.patch [new file with mode: 0644]
meta/recipes-extended/sat-solver/sat-solver_git.bb

diff --git a/meta/recipes-extended/sat-solver/sat-solver/rpm5-solvdb.patch b/meta/recipes-extended/sat-solver/sat-solver/rpm5-solvdb.patch
new file mode 100644 (file)
index 0000000..8ce1b15
--- /dev/null
@@ -0,0 +1,30 @@
+sat-solver rpmdb based solv database construction
+
+The first time the database is created on an RPM5 system it works 
+correctly.  However any subsequent rebuilds cause an empty database to 
+occur.
+
+The following is from Michael Schroeder <mls@suse.de>:
+> rpmdb2solv contains a hack that makes it use the unchanged already
+> converted packages. To do this, it needs to get the database id
+> for every installed packages by reading the "Name" index. This
+> somehow doesn't seem to work with rpm5.
+>
+> As a workaround you can add a "ref = 0;" line at the top of the
+> repo_add_rpmdb() function in ext/repo_rpmdb.c.
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+diff -ur git.orig/ext/repo_rpmdb.c git/ext/repo_rpmdb.c
+--- git.orig/ext/repo_rpmdb.c  2011-03-16 09:43:50.470008215 -0500
++++ git/ext/repo_rpmdb.c       2011-03-16 09:47:55.503989694 -0500
+@@ -1344,6 +1344,9 @@
+   memset(&dbkey, 0, sizeof(dbkey));
+   memset(&dbdata, 0, sizeof(dbdata));
++  /* Workaround for RPM 5 database construction */
++  ref = 0;
++
+   if (!rootdir)
+     rootdir = "";
index 54420cd15495e9d863f645e1a4f9ae4dc80f5a96..a6519d592119809f3d3e07ebad528709057c0093 100644 (file)
@@ -7,11 +7,12 @@ LIC_FILES_CHKSUM = "file://LICENSE.BSD;md5=62272bd11c97396d4aaf1c41bc11f7d8"
 DEPENDS = "libcheck rpm zlib expat db"
 
 PV = "0.0-git${SRCPV}"
-PR = "r4"
+PR = "r5"
 
 SRC_URI = "git://gitorious.org/opensuse/sat-solver.git;protocol=git \
            file://cmake.patch \
            file://rpm5.patch \
+           file://rpm5-solvdb.patch \
            file://db5.patch \
            file://builtin-arch.patch;apply=no \
            file://no-builtin-arch.patch;apply=no \