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