Commit 041a6a13 authored by Vitaly Lipatov's avatar Vitaly Lipatov

rpmbb: fix on non ALT platform

parent 2b60de70
......@@ -124,9 +124,9 @@ do
if ! build_buildroot ; then
LISTRPMARGS="--buildroot $BUILDROOT $LISTRPMARGS"
fi
echo "For non ALT distro clean BuildRoot $BUILDROOT"
echo "For non ALT distro clean BuildRoot $BUILDROOT ..."
test -n "$BUILDROOT" || fatal "BUILDROOT var is empty"
rm -rf "$BUILDROOT"
docmd rm -rf "$BUILDROOT"
fi
LOGFILE="$LOGDIR/`basename $NAMESRPMIN .src.rpm`$MENVARG.log"
rm -f $LOGFILE $LOGFILE.ok
......
......@@ -9,13 +9,14 @@ load_mod build
# get correct BUILDROOT, run build_rpms_name before!
build_buildroot()
{
local TWOPARAM="--quiet"
test -z "$BASENAME" && fatal "Use build_buildroot with BASENAME defined"
# ALT Only?
BUILDROOT=`rpm --eval %buildroot | subst_namever`
[ -n "$RPMTOPDIR" ] && TWOPARAM="--define=_topdir $RPMTOPDIR"
BUILDROOT=`rpm "$TWOPARAM" --eval %buildroot | subst_namever`
test -z "$BUILDROOT" && fatal "Fix rpm's buildroot"
if [ "$BUILDROOT" = "%buildroot" ] ; then
BUILDROOT="$HOME/tmp/$BASENAME-buildroot"
warning "Can't get buildroot from RPM, set to $BUILDROOT"
warning "Can't get buildroot via rpm --eval, set to $BUILDROOT"
return 1
fi
return 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment