diff options
author | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2020-01-17 15:51:35 +0000 |
---|---|---|
committer | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2020-01-17 15:51:35 +0000 |
commit | dc935b381fea22d80e72ff43d0a2391daef750de (patch) | |
tree | 4ed8412208c88f43c968d8d6f24bdcc6a726b747 | |
parent | 8983270ba7d84e2c34a2d2a50def777600bcf3bb (diff) | |
download | midipix_build-dc935b381fea22d80e72ff43d0a2391daef750de.tar.bz2 midipix_build-dc935b381fea22d80e72ff43d0a2391daef750de.tar.xz |
subr/pkg_install_rpm.subr: loop on rpmbuild(1) given exit w/ 141.
-rw-r--r-- | subr/pkg_install_rpm.subr | 20 |
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}/"; |