[gnome-continuous-yocto/gnomeostree-3.28-rocko: 6258/8267] rpm: Simplify the creation of wrappers for the native tools
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 6258/8267] rpm: Simplify the creation of wrappers for the native tools
- Date: Sun, 17 Dec 2017 04:35:33 +0000 (UTC)
commit 50f1f5f4e63d95ab5a7ce4c12249df07541e11b6
Author: Peter Kjellerstedt <peter kjellerstedt axis com>
Date: Fri Jun 9 21:34:30 2017 +0200
rpm: Simplify the creation of wrappers for the native tools
Use a loop rather than calling create_wrapper for each individual
tool.
(From OE-Core rev: e299a396849acd515d51d377958d795e979e6262)
Signed-off-by: Peter Kjellerstedt <peter kjellerstedt axis com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
meta/recipes-devtools/rpm/rpm_git.bb | 73 +++++++++-------------------------
1 files changed, 19 insertions(+), 54 deletions(-)
---
diff --git a/meta/recipes-devtools/rpm/rpm_git.bb b/meta/recipes-devtools/rpm/rpm_git.bb
index 2310ee6..531669a 100644
--- a/meta/recipes-devtools/rpm/rpm_git.bb
+++ b/meta/recipes-devtools/rpm/rpm_git.bb
@@ -67,62 +67,27 @@ BBCLASSEXTEND = "native nativesdk"
# Direct rpm-native to read configuration from our sysroot, not the one it was compiled in
# libmagic also has sysroot path contamination, so override it
do_install_append_class-native() {
- create_wrapper ${D}/${bindir}/rpmbuild \
- RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
- RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
- MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
- RPM_NO_CHROOT_FOR_SCRIPTS=1
-
- create_wrapper ${D}/${bindir}/rpmsign \
- RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
- RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
- MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
- RPM_NO_CHROOT_FOR_SCRIPTS=1
-
- create_wrapper ${D}/${bindir}/rpmkeys \
- RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
- RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
- MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
- RPM_NO_CHROOT_FOR_SCRIPTS=1
-
- create_wrapper ${D}/${bindir}/rpm \
- RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
- RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
- MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
- RPM_NO_CHROOT_FOR_SCRIPTS=1
-
- create_wrapper ${D}/${bindir}/rpm2archive \
- RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
- RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
- MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
- RPM_NO_CHROOT_FOR_SCRIPTS=1
-
- create_wrapper ${D}/${bindir}/rpm2cpio \
- RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
- RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
- MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
- RPM_NO_CHROOT_FOR_SCRIPTS=1
-
- create_wrapper ${D}/${bindir}/rpmdb \
- RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
- RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
- MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
- RPM_NO_CHROOT_FOR_SCRIPTS=1
-
- create_wrapper ${D}/${bindir}/rpmgraph \
- RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
- RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
- MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
- RPM_NO_CHROOT_FOR_SCRIPTS=1
-
- create_wrapper ${D}/${bindir}/rpmspec \
- RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
- RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
- MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
- RPM_NO_CHROOT_FOR_SCRIPTS=1
+ tools="\
+ ${bindir}/rpm \
+ ${bindir}/rpm2archive \
+ ${bindir}/rpm2cpio \
+ ${bindir}/rpmbuild \
+ ${bindir}/rpmdb \
+ ${bindir}/rpmgraph \
+ ${bindir}/rpmkeys \
+ ${bindir}/rpmsign \
+ ${bindir}/rpmspec \
+ "
+
+ for tool in $tools; do
+ create_wrapper ${D}$tool \
+ RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
+ RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
+ MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
+ RPM_NO_CHROOT_FOR_SCRIPTS=1
+ done
}
-
# Rpm's make install creates var/tmp which clashes with base-files packaging
do_install_append_class-target() {
rm -rf ${D}/var
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]