diff options
author | hongxu <hongxu.jia@windriver.com> | 2020-07-29 01:22:06 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-08-01 19:57:49 +0100 |
commit | 92d9cc304d7a88a4620d0b2c7599e7a2c0720e00 (patch) | |
tree | eeb04ee3ae93473f303932975e2a5a392210288c /meta | |
parent | 4b6cafae71c5b9344d7d8bdd458675c9d8e891d4 (diff) | |
download | poky-92d9cc304d7a88a4620d0b2c7599e7a2c0720e00.tar.gz |
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>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/rpm/files/environment.d-rpm.sh | 1 | ||||
-rw-r--r-- | meta/recipes-devtools/rpm/rpm_4.15.1.bb | 5 |
2 files changed, 6 insertions, 0 deletions
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" | |||
25 | LIC_FILES_CHKSUM = "file://COPYING;md5=c0bf017c0fd1920e6158a333acabfd4a" | 25 | LIC_FILES_CHKSUM = "file://COPYING;md5=c0bf017c0fd1920e6158a333acabfd4a" |
26 | 26 | ||
27 | SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.15.x \ | 27 | SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.15.x \ |
28 | file://environment.d-rpm.sh \ | ||
28 | file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \ | 29 | file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \ |
29 | file://0001-Do-not-read-config-files-from-HOME.patch \ | 30 | file://0001-Do-not-read-config-files-from-HOME.patch \ |
30 | file://0001-When-cross-installing-execute-package-scriptlets-wit.patch \ | 31 | file://0001-When-cross-installing-execute-package-scriptlets-wit.patch \ |
@@ -112,6 +113,9 @@ do_install_append_class-nativesdk() { | |||
112 | done | 113 | done |
113 | 114 | ||
114 | rm -rf ${D}/var | 115 | rm -rf ${D}/var |
116 | |||
117 | mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d | ||
118 | install -m 644 ${WORKDIR}/environment.d-rpm.sh ${D}${SDKPATHNATIVE}/environment-setup.d/rpm.sh | ||
115 | } | 119 | } |
116 | 120 | ||
117 | # Rpm's make install creates var/tmp which clashes with base-files packaging | 121 | # Rpm's make install creates var/tmp which clashes with base-files packaging |
@@ -129,6 +133,7 @@ do_install_append () { | |||
129 | 133 | ||
130 | FILES_${PN} += "${libdir}/rpm-plugins/*.so \ | 134 | FILES_${PN} += "${libdir}/rpm-plugins/*.so \ |
131 | " | 135 | " |
136 | FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/rpm.sh" | ||
132 | 137 | ||
133 | FILES_${PN}-dev += "${libdir}/rpm-plugins/*.la \ | 138 | FILES_${PN}-dev += "${libdir}/rpm-plugins/*.la \ |
134 | " | 139 | " |