summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--subr/pkg_install_rpm.subr20
1 files changed, 14 insertions, 6 deletions
diff --git a/subr/pkg_install_rpm.subr b/subr/pkg_install_rpm.subr
index 2a3cac1c..59667388 100644
--- a/subr/pkg_install_rpm.subr
+++ b/subr/pkg_install_rpm.subr
@@ -21,7 +21,6 @@ pkg_install_rpm() {
fi;
fi;
cat > "${PKG_BASE_DIR}/${PKG_NAME}-${_pkg_version_rpm}.spec" <<EOF
-Buildroot: ${PREFIX_RPM}/${PKG_NAME}-${_pkg_version_rpm}/BUILDROOT
Name: ${PKG_NAME}
Version: ${_pkg_version_rpm}
Release: 1
@@ -48,11 +47,20 @@ cp -pPr "${PKG_DESTDIR}/." "\${RPM_BUILD_ROOT}"
%changelog
EOF
- rpmbuild \
- -bb \
- --define="_tmppath ${BUILD_WORKDIR}" \
- --define="_topdir ${PREFIX_RPM}/${PKG_NAME}-${_pkg_version_rpm}" \
- --nodeps "${PKG_BASE_DIR}/${PKG_NAME}-${_pkg_version_rpm}.spec";
+ while true; do
+ if ! rpmbuild \
+ -bb \
+ --define="_tmppath ${BUILD_WORKDIR}" \
+ --define="_topdir ${PREFIX_RPM}/${PKG_NAME}-${_pkg_version_rpm}" \
+ --nodeps "${PKG_BASE_DIR}/${PKG_NAME}-${_pkg_version_rpm}.spec";
+ then
+ if [ "${?}" -ne 141 ]; then
+ break;
+ fi;
+ else
+ break;
+ fi;
+ done;
find "${PREFIX_RPM}/${PKG_NAME}-${_pkg_version_rpm}/RPMS" -iname \*.rpm -exec cp -pP {} "${PREFIX_RPM}/" \;;
ex_rtl_fileop rm "${PREFIX_RPM}/${PKG_NAME}-${_pkg_version_rpm}";
ex_rtl_fileop cp "${PKG_BASE_DIR}/${PKG_NAME}-${_pkg_version_rpm}.spec" "${PREFIX_RPM}/";