diff mbox series

rpm: fix RPM_ETCCONFIGDIR value in SDK

Message ID 20230321164559.11938-1-Qi.Chen@windriver.com
State Accepted, archived
Commit 2c6388e5bbf45a71891aa90047eef980d8a27c9d
Headers show
Series rpm: fix RPM_ETCCONFIGDIR value in SDK | expand

Commit Message

ChenQi March 21, 2023, 4:45 p.m. UTC
The RPM_ETCCONFIGDIR should be some root directory instead of the
etc directory as in patch 0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch
RPM_ETCCONFIGDIR is used to prefix /etc.

The regression was introduced in the following patch.
"""
nativesdk-rpm: export RPM_ETCCONFIGDIR and MAGIC in environment like RPM_CONFIGDIR
"""
The patch incorrectly set RPM_ETCCONFIGDIR, maybe because this variable's
name is a little misleading.

Note that this patch modifies both RPM_ETCCONFIGDIR and RPM_CONFIGDIR.
The RPM_CONFIGDIR's value happened to be correct because of the ${libdir},
not $OECORE_NATIVE_SYSROOT. In fact, due to the substitution mechanism,
the $OECORE_NATIVE_SYSROOT is empty.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-devtools/rpm/rpm_4.18.0.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/meta/recipes-devtools/rpm/rpm_4.18.0.bb b/meta/recipes-devtools/rpm/rpm_4.18.0.bb
index aa398793e2..7790db8b5a 100644
--- a/meta/recipes-devtools/rpm/rpm_4.18.0.bb
+++ b/meta/recipes-devtools/rpm/rpm_4.18.0.bb
@@ -122,8 +122,8 @@  do_install:append:class-nativesdk() {
 
 	mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d
 	cat <<- EOF > ${D}${SDKPATHNATIVE}/environment-setup.d/rpm.sh
-		export RPM_CONFIGDIR="$OECORE_NATIVE_SYSROOT${libdir}/rpm"
-		export RPM_ETCCONFIGDIR="$OECORE_NATIVE_SYSROOT${sysconfdir}"
+		export RPM_CONFIGDIR="${libdir}/rpm"
+		export RPM_ETCCONFIGDIR="${SDKPATHNATIVE}"
 		export RPM_NO_CHROOT_FOR_SCRIPTS=1
 	EOF
 }