diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2011-03-16 17:15:09 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-03-17 00:18:14 +0000 |
commit | 275241ea681a8a6019b89c41ec39d65c45b851f3 (patch) | |
tree | 4ce5734d1caf268068aa8d5baedee8687aa6c78a /meta/recipes-extended/sat-solver/sat-solver/sat-solver_rpm5.patch | |
parent | 129c62433380a314dadffafb367c5bd6f7dccfaf (diff) | |
download | poky-275241ea681a8a6019b89c41ec39d65c45b851f3.tar.gz |
sat-solver: Fix solution DB generation and general cleanup
Uprev sat-solver to the latest git version. This corrects the solv db
generation with RPM5.
Refactor the patches for RPM5 support, cleaning up components of the
cmake.patch for submission upstream. (Also fix a problem remaining
in the upstream with a mismatched function name.)
(From OE-Core rev: 89a5ad96eef411dccea817a6c37cb1e24840fdc1)
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/sat-solver/sat-solver/sat-solver_rpm5.patch')
-rw-r--r-- | meta/recipes-extended/sat-solver/sat-solver/sat-solver_rpm5.patch | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/meta/recipes-extended/sat-solver/sat-solver/sat-solver_rpm5.patch b/meta/recipes-extended/sat-solver/sat-solver/sat-solver_rpm5.patch new file mode 100644 index 0000000000..1776f6cd59 --- /dev/null +++ b/meta/recipes-extended/sat-solver/sat-solver/sat-solver_rpm5.patch | |||
@@ -0,0 +1,67 @@ | |||
1 | Add RPM5 configuration support | ||
2 | |||
3 | Update the cmake configuration to detect additional files needed by RPM5. | ||
4 | |||
5 | Original work by Qing He <qing.he@intel.com>. | ||
6 | |||
7 | Merged and updated to make this more likely to be accepted upstream. | ||
8 | |||
9 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
10 | |||
11 | diff -ur git.orig/CMakeLists.txt git/CMakeLists.txt | ||
12 | --- git.orig/CMakeLists.txt 2011-03-16 16:16:29.152786178 -0500 | ||
13 | +++ git/CMakeLists.txt 2011-03-16 16:29:43.532032285 -0500 | ||
14 | @@ -50,7 +50,16 @@ | ||
15 | ADD_DEFINITIONS( -DMULTI_SEMANTICS) | ||
16 | ENDIF ( MULTI_SEMANTICS ) | ||
17 | |||
18 | -IF ( NOT DEBIAN ) | ||
19 | +if ( RPM5 ) | ||
20 | +MESSAGE(STATUS "Enabling RPM 5 support") | ||
21 | +ADD_DEFINITIONS( -DRPM5) | ||
22 | + | ||
23 | +FIND_PACKAGE(PkgConfig REQUIRED) | ||
24 | +PKG_CHECK_MODULES(RPM REQUIRED rpm) | ||
25 | +INCLUDE_DIRECTORIES( ${RPM_INCLUDE_DIRS} ) | ||
26 | +ENDIF ( RPM5 ) | ||
27 | + | ||
28 | +IF ( RPM5 OR NOT DEBIAN ) | ||
29 | FIND_LIBRARY(RPMDB_LIBRARY NAMES rpmdb) | ||
30 | IF ( NOT RPMDB_LIBRARY ) | ||
31 | FIND_LIBRARY(RPMDB_LIBRARY NAMES rpm) | ||
32 | @@ -59,13 +68,17 @@ | ||
33 | IF ( RPMIO_LIBRARY ) | ||
34 | SET( RPMDB_LIBRARY ${RPMIO_LIBRARY} ${RPMDB_LIBRARY} ) | ||
35 | ENDIF ( RPMIO_LIBRARY ) | ||
36 | -IF ( FEDORA ) | ||
37 | +FIND_LIBRARY(RPMMISC_LIBRARY NAMES rpmmisc) | ||
38 | +IF ( RPMMISC_LIBRARY ) | ||
39 | +SET ( RPMDB_LIBRARY ${RPMMISC_LIBRARY} ${RPMDB_LIBRARY} ) | ||
40 | +ENDIF ( RPMMISC_LIBRARY ) | ||
41 | +IF ( RPM5 OR FEDORA ) | ||
42 | FIND_LIBRARY(DB_LIBRARY NAMES db) | ||
43 | IF ( DB_LIBRARY ) | ||
44 | SET( RPMDB_LIBRARY ${DB_LIBRARY} ${RPMDB_LIBRARY} ) | ||
45 | ENDIF ( DB_LIBRARY ) | ||
46 | -ENDIF ( FEDORA ) | ||
47 | -ENDIF ( NOT DEBIAN ) | ||
48 | +ENDIF ( RPM5 OR FEDORA ) | ||
49 | +ENDIF ( RPM5 OR NOT DEBIAN ) | ||
50 | |||
51 | INCLUDE ( CheckFunctionExists ) | ||
52 | INCLUDE ( TestBigEndian ) | ||
53 | diff -ur git.orig/ext/repo_rpmdb.c git/ext/repo_rpmdb.c | ||
54 | --- git.orig/ext/repo_rpmdb.c 2011-03-16 18:03:55.401907738 -0500 | ||
55 | +++ git/ext/repo_rpmdb.c 2011-03-16 18:04:47.472989651 -0500 | ||
56 | @@ -3039,7 +3039,11 @@ | ||
57 | repodata_set_str(data, s - s->repo->pool->solvables, PUBKEY_KEYID, keyid); | ||
58 | if (dig->pubkey.userid) | ||
59 | setutf8string(data, s - s->repo->pool->solvables, SOLVABLE_SUMMARY, dig->pubkey.userid); | ||
60 | +#ifndef RPM5 | ||
61 | (void)pgpFreeDig(dig); | ||
62 | +#else | ||
63 | + (void)pgpDigFree(dig); | ||
64 | +#endif | ||
65 | sat_free((void *)pkts); | ||
66 | return 1; | ||
67 | } | ||