aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm
diff options
context:
space:
mode:
authorMing Liu <peter.x.liu@external.atlascopco.com>2016-08-09 10:01:41 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-17 10:35:42 +0100
commitbba1b911c86557db66af4baf7f15813f43c1ae70 (patch)
tree5e5ce8c78ccb5fbc6ca1aea4f08127ca14e2de3e /meta/recipes-devtools/rpm
parent92f505b0162f666b14208e2835c7def9f2cd4f2c (diff)
downloadopenembedded-core-contrib-bba1b911c86557db66af4baf7f15813f43c1ae70.tar.gz
Use PYTHON_SITEPACKAGES_DIR insted of hard-coded *site-packages*
For thoese recipes that are inheriting python*-dir.bbclass, there is already a PYTHON_SITEPACKAGES_DIR present, use that definition replacing redundant "${libdir}/python*/site-packages". (From OE-Core rev: e7d842673952aa4aaa141f64958bc1344dbe8210) Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/rpm')
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.4.16.bb18
1 files changed, 9 insertions, 9 deletions
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.16.bb b/meta/recipes-devtools/rpm/rpm_5.4.16.bb
index d264d5011a..84adef661a 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.16.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.16.bb
@@ -259,7 +259,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}/site-packages \
+ --with-python-lib-dir=${PYTHON_SITEPACKAGES_DIR} \
--without-pythonembed"
PACKAGECONFIG[python] = "${WITH_PYTHON},--without-python,python,"
@@ -477,7 +477,7 @@ RDEPENDS_${PN}-build = "file bash perl"
RDEPENDS_python-rpm = "${PN} python"
-FILES_python-rpm = "${libdir}/python*/site-packages/rpm"
+FILES_python-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm"
PROVIDES += "python-rpm"
FILES_perl-module-rpm = "${libdir}/perl/*/* \
@@ -512,7 +512,7 @@ FILES_${PN}-staticdev = " \
${libdir}/librpmmisc.a \
${libdir}/librpmbuild.a \
${libdir}/rpm/lib/liblua.a \
- ${libdir}/python*/site-packages/rpm/*.a \
+ ${PYTHON_SITEPACKAGES_DIR}/rpm/*.a \
"
do_configure() {
@@ -581,10 +581,10 @@ do_install_append() {
rm -f ${D}/${mandir}/man1/lz*.1
rm -f ${D}/${libdir}/pkgconfig/liblzma*
- rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.a
- rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.la
- rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.a
- rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.la
+ rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/*.a
+ rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/*.la
+ rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/rpm/*.a
+ rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/rpm/*.la
#find ${D}/${libdir}/perl5 -type f -a \( -name perllocal.pod -o -name .packlist \
# -o \( -name '*.bs' -a -empty \) \) -exec rm -f {} ';'
@@ -647,11 +647,11 @@ EOF
}
do_install_append_class-native () {
- sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env nativepython|' ${D}/${libdir}/python2.7/site-packages/rpm/transaction.py
+ sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env nativepython|' ${D}${PYTHON_SITEPACKAGES_DIR}/rpm/transaction.py
}
do_install_append_class-nativesdk () {
- sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env python|' ${D}/${libdir}/python2.7/site-packages/rpm/transaction.py
+ sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env python|' ${D}${PYTHON_SITEPACKAGES_DIR}/rpm/transaction.py
}
def multilib_rpmmacros(d):