diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2017-06-09 21:34:30 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-06-12 23:01:22 +0100 |
commit | 50f1f5f4e63d95ab5a7ce4c12249df07541e11b6 (patch) | |
tree | 9e06b4a4a3344f59890f8b7c23b2b819fb32d319 /meta/recipes-devtools/rpm/rpm_git.bb | |
parent | 7625d4121eee0d430e38c65d8e4db0462d7a8aef (diff) | |
download | poky-50f1f5f4e63d95ab5a7ce4c12249df07541e11b6.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: e299a396849acd515d51d377958d795e979e6262)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/rpm/rpm_git.bb')
-rw-r--r-- | 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 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 |
69 | do_install_append_class-native() { | 69 | do_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 |
127 | do_install_append_class-target() { | 92 | do_install_append_class-target() { |
128 | rm -rf ${D}/var | 93 | rm -rf ${D}/var |