aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2012-10-04 13:54:13 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-11-14 23:37:34 +0000
commitcd0473a145cec51be736b6141b0b18a82b64d483 (patch)
tree30f30aec6baa017be6af793671dc07291f58868d /meta/recipes-devtools/rpm
parentb53ea6687b6201c8c5ab5cb0d2a845ef7e7b2abe (diff)
downloadopenembedded-core-contrib-cd0473a145cec51be736b6141b0b18a82b64d483.tar.gz
rpm: Slightly change the way python-rpm is constructed
If python support is enabled we want to make sure that the RPM python support is packaged properly. Move the components into the site-packages directory, move the .la files to a new -dev package. Add "rpm" as a dependency of python-rpm, otherwise rpm and the associated libraries won't be available. Fixup python wrapper to handle automatic relocation, as supported by the vendor WINDRIVER configuration. (Based on a patch from Paul Eggleton) Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'meta/recipes-devtools/rpm')
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-py-init.patch27
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.4.9.bb16
2 files changed, 37 insertions, 6 deletions
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch b/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch
new file mode 100644
index 0000000000..b65abc24a0
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch
@@ -0,0 +1,27 @@
+python/rpmmodules.c: Change the way the python module loads the RPM config
+
+In order to support the RPM_VENDOR_WINDRIVER enhancement of dynamic
+runtime relocation paths, we need to call rpmcliInit instead of
+rpmReadConfigFiles. The rpmcliInit will end up calling rpmReadConfigFiles
+after the necessary relocation processing (if enabled).
+
+Code derived from changes suggested by Paul Eggleton.
+
+Upstream-Status: Pending
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+diff --git a/python/rpmmodule.c b/python/rpmmodule.c
+index f7282bc..dde68ca 100644
+--- a/python/rpmmodule.c
++++ b/python/rpmmodule.c
+@@ -392,7 +392,8 @@ void init_rpm(void)
+ if (Py_AtExit(rpm_exithook) == -1)
+ return;
+
+- rpmReadConfigFiles(NULL, NULL);
++ const char *argv[1] = {"rpmmodule", 0};
++ rpmcliInit(1, argv, NULL);
+
+ d = PyModule_GetDict(m);
+
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.9.bb b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
index 072128403a..44f1ca1aeb 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.9.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
@@ -43,7 +43,7 @@ LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
DEPENDS = "libpcre attr acl popt ossp-uuid file bison-native"
-PR = "r52"
+PR = "r53"
# rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed
# in order to extract the distribution SRPM into a format we can extract...
@@ -80,6 +80,7 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.9-0.20120508.src.rpm;ex
file://makefile-am-exec-hook.patch \
file://rpm-stub-out-git_strerror.patch \
file://rpm-db_buffer_small.patch \
+ file://rpm-py-init.patch \
"
SRC_URI[md5sum] = "60d56ace884340c1b3fcac6a1d58e768"
@@ -107,7 +108,7 @@ PACKAGECONFIG[xar] = "--with-xar,--without-xar,xar,"
WITH_PYTHON = " --with-python=${PYTHON_BASEVERSION} \
--with-python-inc-dir=${STAGING_INCDIR}/python${PYTHON_BASEVERSION} \
- --with-python-lib-dir=${libdir}/python${PYTHON_BASEVERSION} \
+ --with-python-lib-dir=${libdir}/python${PYTHON_BASEVERSION}/site-packages \
--without-pythonembed"
PACKAGECONFIG[python] = "${WITH_PYTHON},--without-python,python,"
@@ -189,7 +190,7 @@ CFLAGS_append = " -DRPM_VENDOR_WINDRIVER -DRPM_VENDOR_POKY -DRPM_VENDOR_OE"
LDFLAGS_append_libc-uclibc = "-lrt -lpthread"
-PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-libs ${PN}-dev ${PN}-staticdev ${PN}-common ${PN}-build python-rpm-dbg python-rpm-staticdev python-rpm perl-module-rpm perl-module-rpm-dev ${PN}-locale"
+PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-libs ${PN}-dev ${PN}-staticdev ${PN}-common ${PN}-build python-rpm-dbg python-rpm-staticdev python-rpm-dev python-rpm perl-module-rpm perl-module-rpm-dev ${PN}-locale"
SOLIBS = "5.4.so"
@@ -302,9 +303,12 @@ RDEPENDS_${PN} = "base-files"
RDEPENDS_${PN}_class-native = ""
RDEPENDS_${PN}-build = "file"
-FILES_python-rpm-dbg = "${libdir}/python*/rpm/.debug/_*"
-FILES_python-rpm-staticdev = "${libdir}/python*/rpm/*.a"
-FILES_python-rpm = "${libdir}/python*/rpm"
+RDEPENDS_python-rpm = "${PN}"
+
+FILES_python-rpm-dbg = "${libdir}/python*/site-packages/rpm/.debug/_*"
+FILES_python-rpm-dev = "${libdir}/python*/site-packages/rpm/*.la"
+FILES_python-rpm-staticdev = "${libdir}/python*/site-packages/rpm/*.a"
+FILES_python-rpm = "${libdir}/python*/site-packages/rpm"
FILES_perl-module-rpm = "${libdir}/perl/*/* \
"