summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/package_rpm.bbclass14
1 files changed, 11 insertions, 3 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 59e8d48b20..5c67f69bb9 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -177,7 +177,15 @@ package_install_internal_rpm () {
177 echo "${platform}${TARGET_VENDOR}-${TARGET_OS}" > ${target_rootfs}/etc/rpm/platform 177 echo "${platform}${TARGET_VENDOR}-${TARGET_OS}" > ${target_rootfs}/etc/rpm/platform
178 if [ ! -z "$platform_extra" ]; then 178 if [ ! -z "$platform_extra" ]; then
179 for pt in $platform_extra ; do 179 for pt in $platform_extra ; do
180 echo "$pt-.*-${TARGET_OS}" >> ${target_rootfs}/etc/rpm/platform 180 case $pt in
181 noarch | any | all)
182 os="`echo ${TARGET_OS} | sed "s,-.*,,"`.*"
183 ;;
184 *)
185 os="${TARGET_OS}"
186 ;;
187 esac
188 echo "$pt-.*-$os" >> ${target_rootfs}/etc/rpm/platform
181 done 189 done
182 fi 190 fi
183 191
@@ -821,13 +829,13 @@ python do_package_rpm () {
821 targetsys = bb.data.getVar('TARGET_SYS', d, True) 829 targetsys = bb.data.getVar('TARGET_SYS', d, True)
822 targetvendor = bb.data.getVar('TARGET_VENDOR', d, True) 830 targetvendor = bb.data.getVar('TARGET_VENDOR', d, True)
823 pkgwritedir = bb.data.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH}', d) 831 pkgwritedir = bb.data.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH}', d)
824 pkgarch = bb.data.expand('${PACKAGE_ARCH}', d) 832 pkgarch = bb.data.expand('${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}', d)
825 magicfile = bb.data.expand('${STAGING_DIR_NATIVE}/usr/share/misc/magic.mgc', d) 833 magicfile = bb.data.expand('${STAGING_DIR_NATIVE}/usr/share/misc/magic.mgc', d)
826 bb.mkdirhier(pkgwritedir) 834 bb.mkdirhier(pkgwritedir)
827 os.chmod(pkgwritedir, 0755) 835 os.chmod(pkgwritedir, 0755)
828 836
829 cmd = rpmbuild 837 cmd = rpmbuild
830 cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + targetvendor + "-linux-gnu --buildroot " + pkgd 838 cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + " --buildroot " + pkgd
831 cmd = cmd + " --define '_topdir " + workdir + "' --define '_rpmdir " + pkgwritedir + "'" 839 cmd = cmd + " --define '_topdir " + workdir + "' --define '_rpmdir " + pkgwritedir + "'"
832 cmd = cmd + " --define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm'" 840 cmd = cmd + " --define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm'"
833 cmd = cmd + " --define '_use_internal_dependency_generator 0'" 841 cmd = cmd + " --define '_use_internal_dependency_generator 0'"