Skip to content

Commit

Permalink
Fix --no-checks with older rpmbuild
Browse files Browse the repository at this point in the history
If the --nocheck rpmbuild option is not supported, disable at least the
post build checks. This happens e.g. on SLE11.
  • Loading branch information
michal42 committed Jan 15, 2015
1 parent 7964b1b commit 622c6ab
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion build-recipe-spec
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ recipe_build_spec() {
# XXX: move _srcdefattr to macro file?
rpmbopts=("$BUILD_RPM_BUILD_STAGE" "--define" "_srcdefattr (-,root,root)")
if test "$DO_CHECKS" != true ; then
rpmbopts[${#rpmbopts[@]}]="--nocheck"
if chroot "$BUILD_ROOT" rpmbuild --nocheck --help >/dev/null 2>&1; then
rpmbopts[${#rpmbopts[@]}]="--nocheck"
else
echo "warning: --nocheck is not supported by this rpmbuild version"
fi
fi
if test "$rpmbuild" == "rpmbuild" ; then
# use only --nosignature for rpm v4
Expand Down

0 comments on commit 622c6ab

Please sign in to comment.