summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2017-08-29 23:21:06 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-31 17:57:12 +0100
commite6aa58d0b00f0b82967cde816cbba319298dff9a (patch)
tree3fdabde7b85106bfb86fa4be0b68e8ea6fbaeeae /meta/recipes-devtools
parent14effcc3d6bea80826808e2c30ac5d180dc67766 (diff)
downloadpoky-e6aa58d0b00f0b82967cde816cbba319298dff9a.tar.gz
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: d052c534c5099b9927ec84b23e01341f0aa3ce7d) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/rpm/rpm_git.bb73
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 2310ee6b09..531669ae73 100644
--- a/meta/recipes-devtools/rpm/rpm_git.bb
+++ b/meta/recipes-devtools/rpm/rpm_git.bb
@@ -67,62 +67,27 @@ BBCLASSEXTEND = "native nativesdk"
67# Direct rpm-native to read configuration from our sysroot, not the one it was compiled in 67# Direct rpm-native to read configuration from our sysroot, not the one it was compiled in
68# libmagic also has sysroot path contamination, so override it 68# libmagic also has sysroot path contamination, so override it
69do_install_append_class-native() { 69do_install_append_class-native() {
70 create_wrapper ${D}/${bindir}/rpmbuild \ 70 tools="\
71 RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \ 71 ${bindir}/rpm \
72 RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \ 72 ${bindir}/rpm2archive \
73 MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \ 73 ${bindir}/rpm2cpio \
74 RPM_NO_CHROOT_FOR_SCRIPTS=1 74 ${bindir}/rpmbuild \
75 75 ${bindir}/rpmdb \
76 create_wrapper ${D}/${bindir}/rpmsign \ 76 ${bindir}/rpmgraph \
77 RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \ 77 ${bindir}/rpmkeys \
78 RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \ 78 ${bindir}/rpmsign \
79 MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \ 79 ${bindir}/rpmspec \
80 RPM_NO_CHROOT_FOR_SCRIPTS=1 80 "
81 81
82 create_wrapper ${D}/${bindir}/rpmkeys \ 82 for tool in $tools; do
83 RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \ 83 create_wrapper ${D}$tool \
84 RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \ 84 RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
85 MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \ 85 RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
86 RPM_NO_CHROOT_FOR_SCRIPTS=1 86 MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
87 87 RPM_NO_CHROOT_FOR_SCRIPTS=1
88 create_wrapper ${D}/${bindir}/rpm \ 88 done
89 RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
90 RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
91 MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
92 RPM_NO_CHROOT_FOR_SCRIPTS=1
93
94 create_wrapper ${D}/${bindir}/rpm2archive \
95 RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
96 RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
97 MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
98 RPM_NO_CHROOT_FOR_SCRIPTS=1
99
100 create_wrapper ${D}/${bindir}/rpm2cpio \
101 RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
102 RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
103 MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
104 RPM_NO_CHROOT_FOR_SCRIPTS=1
105
106 create_wrapper ${D}/${bindir}/rpmdb \
107 RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
108 RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
109 MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
110 RPM_NO_CHROOT_FOR_SCRIPTS=1
111
112 create_wrapper ${D}/${bindir}/rpmgraph \
113 RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
114 RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
115 MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
116 RPM_NO_CHROOT_FOR_SCRIPTS=1
117
118 create_wrapper ${D}/${bindir}/rpmspec \
119 RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
120 RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
121 MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
122 RPM_NO_CHROOT_FOR_SCRIPTS=1
123} 89}
124 90
125
126# Rpm's make install creates var/tmp which clashes with base-files packaging 91# Rpm's make install creates var/tmp which clashes with base-files packaging
127do_install_append_class-target() { 92do_install_append_class-target() {
128 rm -rf ${D}/var 93 rm -rf ${D}/var