[prev in list] [next in list] [prev in thread] [next in thread]
List: openembedded-core
Subject: [OE-core] [PATCH] nativesdk-rpm: adjust RPM_CONFIGDIR paths dynamically
From: "hongxu" <hongxu.jia () windriver ! com>
Date: 2020-07-29 8:22:06
Message-ID: 20200729082206.43438-1-hongxu.jia () windriver ! com
[Download RAW message or body]
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.
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
meta/recipes-devtools/rpm/files/environment.d-rpm.sh | 1 +
meta/recipes-devtools/rpm/rpm_4.15.1.bb | 5 +++++
2 files changed, 6 insertions(+)
create mode 100644 meta/recipes-devtools/rpm/files/environment.d-rpm.sh
diff --git a/meta/recipes-devtools/rpm/files/environment.d-rpm.sh \
b/meta/recipes-devtools/rpm/files/environment.d-rpm.sh new file mode 100644
index 0000000000..9b669a18d1
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/environment.d-rpm.sh
@@ -0,0 +1 @@
+export RPM_CONFIGDIR="$OECORE_NATIVE_SYSROOT/usr/lib/rpm"
diff --git a/meta/recipes-devtools/rpm/rpm_4.15.1.bb \
b/meta/recipes-devtools/rpm/rpm_4.15.1.bb index b5a0ac9382..c9258632d2 100644
--- a/meta/recipes-devtools/rpm/rpm_4.15.1.bb
+++ b/meta/recipes-devtools/rpm/rpm_4.15.1.bb
@@ -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 \
"
--
2.21.0
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#141076): https://lists.openembedded.org/g/openembedded-core/message/141076
Mute This Topic: https://lists.openembedded.org/mt/75861006/4454766
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [openembedded-core@marc.info]
-=-=-=-=-=-=-=-=-=-=-=-
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic