nativesdk-rpm: adjust RPM_CONFIGDIR paths dynamically

While installing/extracting SDK to a non-default dir(not /opt),
run rpm failed:
$ python3 -c "import rpm"
|error: Unable to open /opt/windriver/wrlinux-graphics/20.31/sysroots/
x86_64-wrlinuxsdk-linux/usr/lib/rpm/rpmrc for reading: No such file or
directory.

This patch adds a flexible way to configure RPM_CONFIGDIR in SDK.

(From OE-Core rev: 5f16fd0bf774314c79572daf4ba7e4a8ae209ba1)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
hongxu
2020-07-29 01:22:06 -07:00
committed by Richard Purdie
parent 4b6cafae71
commit 92d9cc304d
2 changed files with 6 additions and 0 deletions

View File

@@ -0,0 +1 @@
export RPM_CONFIGDIR="$OECORE_NATIVE_SYSROOT/usr/lib/rpm"

View File

@@ -25,6 +25,7 @@ LICENSE = "GPL-2.0"
LIC_FILES_CHKSUM = "file://COPYING;md5=c0bf017c0fd1920e6158a333acabfd4a"
SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.15.x \
file://environment.d-rpm.sh \
file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \
file://0001-Do-not-read-config-files-from-HOME.patch \
file://0001-When-cross-installing-execute-package-scriptlets-wit.patch \
@@ -112,6 +113,9 @@ do_install_append_class-nativesdk() {
done
rm -rf ${D}/var
mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d
install -m 644 ${WORKDIR}/environment.d-rpm.sh ${D}${SDKPATHNATIVE}/environment-setup.d/rpm.sh
}
# Rpm's make install creates var/tmp which clashes with base-files packaging
@@ -129,6 +133,7 @@ do_install_append () {
FILES_${PN} += "${libdir}/rpm-plugins/*.so \
"
FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/rpm.sh"
FILES_${PN}-dev += "${libdir}/rpm-plugins/*.la \
"