Commit c080d950 authored by Vitaly Lipatov's avatar Vitaly Lipatov

rpm: remove COMMAND parameter from uni_buildrpm

parent b365d427
......@@ -75,7 +75,7 @@ test -n "$LISTRPMARGS" && echog "Run $RPMBUILD with options: '$LISTRPMARGS'"
# instead cbuild req
if [ -n "$BUILDREQ" ] ; then
uni_rpmbuild buildreq $LISTNAMES
uni_buildreq $LISTNAMES
RET=$?
echog "You can run buildreq with -bi param for search a dependences for install section of the package"
exit $RET
......@@ -85,7 +85,7 @@ if [ -n "$BUILDOPT" ] ; then
is_alt || fatal "Sorry, only ALT Linux systems support --short-circuit correctly"
for it in $BUILDOPT
do
uni_rpmbuild $RPMBUILD $LISTNAMES -b$it $LISTRPMARGS --target $DEFAULTARCH --short-circuit
uni_rpmbuild $LISTNAMES -b$it $LISTRPMARGS --target $DEFAULTARCH --short-circuit
done
exit 0
fi
......@@ -109,7 +109,7 @@ do
LOGFILE="$LOGDIR/`basename $NAMESRPMIN .src.rpm`$MENVARG.log"
echo "Build in native system" >$LOGFILE
rm -f $LOGFILE.failed
(uni_rpmbuild $RPMBUILD $i -bb $LISTRPMARGS $NODEPS --target $DEFAULTARCH 2>&1 || touch $LOGFILE.failed) | tee -a $LOGFILE
(uni_rpmbuild $i -bb $LISTRPMARGS $NODEPS --target $DEFAULTARCH 2>&1 || touch $LOGFILE.failed) | tee -a $LOGFILE
[ -r "$LOGFILE.failed" ] && RET=1 || RET=0
if [ "$RET" = "0" ] ; then
......
......@@ -11,12 +11,11 @@
uni_rpmbuild()
{
local RET=0
local COMMAND=$1
# hack due quotes
# just for fill by something
local ONEPARAM="-v"
local TWOPARAM="-v"
shift
local SPECNAME=$1
local SPECDIR=`dirname $SPECNAME`
local GEAR=gear
......@@ -31,30 +30,21 @@ uni_rpmbuild()
TWOPARAM="--define=_topdir $RPMTOPDIR"
fi
if [ "$COMMAND" = "buildreq" ] ; then
if is_gear $SPECDIR ; then
$NICE $GEARBUILDREQ --commit -- $@ || RET=$?
else
$NICE $COMMAND $@ || RET=$?
fi
return $RET
fi
if is_gear $SPECDIR ; then
[ -f "$SPECNAME" ] || fatal "run uni_rpmbuild with spec as 2nd parameter"
shift # skip spec name
[ -n "$SPECDIR" ] && [ "$SPECDIR" != "." ] && warning "Spec is not in git dir"
if [ "$MENV" = "SS" ] ; then
$NICE $GEAR --commit --rpmbuild -- $COMMAND "$ONEPARAM" "$TWOPARAM" $@ || RET=$?
$NICE $GEAR --commit --rpmbuild -- $RPMBUILD "$ONEPARAM" "$TWOPARAM" $@ || RET=$?
else
# build src.rpm via hasher (on ALT)
# $NICE gear-hsh --build-args="-bs" --rpmbuild -- $COMMAND "$ONEPARAM" $@
$NICE $GEAR --hasher -- myhsh --build-prog=$ETERBUILDDIR/functions/rebuild $@ || RET=$?
fi
else
$NICE $COMMAND "$ONEPARAM" "$TWOPARAM" $@ || RET=$?
$NICE $RPMBUILD "$ONEPARAM" "$TWOPARAM" $@ || RET=$?
fi
[ -n "$VERBOSE" ] && echo "Run $COMMAND $ONEPARAM $TWOPARAM $@" || :
[ -n "$VERBOSE" ] && echo "Run $RPMBUILD $ONEPARAM $TWOPARAM $@" || :
return $RET
}
......@@ -177,10 +167,10 @@ do
sleep 10
exit 1
fi
uni_rpmbuild $RPMBUILD $i -bs $ARGS $NODEPS --target $DEFAULTARCH
uni_rpmbuild $i -bs $ARGS $NODEPS --target $DEFAULTARCH
else
echog "Just packing \$NAMESRPMIN"
uni_rpmbuild $RPMBUILD $i -bs $ARGS $NODEPS --target $DEFAULTARCH || fatal "Error with rpmbuild"
uni_rpmbuild $i -bs $ARGS $NODEPS --target $DEFAULTARCH || fatal "Error with rpmbuild"
fi
fi
if [ -f $RPMDIR/SRPMS/$NAMESRPMIN ] ; then
......
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