Commit 54c7c54f authored by Vitaly Lipatov's avatar Vitaly Lipatov

rpmbsh: make temporary commit before build (rpmbb like behaviour)

parent 94052176
...@@ -17,6 +17,7 @@ load_mod rpm ...@@ -17,6 +17,7 @@ load_mod rpm
RESULT=0 RESULT=0
REMCOM= REMCOM=
COMMIT=
############################# #############################
Usage="Usage: $name [-r -s -u -m -i -c] spec..." Usage="Usage: $name [-r -s -u -m -i -c] spec..."
...@@ -31,18 +32,18 @@ phelp() ...@@ -31,18 +32,18 @@ phelp()
echog "$Usage" echog "$Usage"
echog "Options:" echog "Options:"
echog " -r - remote build" echog " -r - remote build"
echog " -m - sent result via email" echog " -t - make temporary commit before build (rpmbb like behavior)"
echog " -u/-U - sign and upload after build" echog " -u/-U - sign and upload after build"
echog " -s - sign and and copy to upload after build" echog " -s - sign and and copy to upload after build"
echog " -i - install built packages in test hasher" echog " -i - install built packages in test hasher"
echog " -c - build without stuff (previous built packages)" echog " -c - build without stuff (previous built packages)"
} }
while getopts :hrusim opt; do while getopts :hrusimt opt; do
case $opt in case $opt in
h) phelp; exit 0;; h) phelp; exit 0;;
r) REMOTEBUILD=1 ;; r) REMOTEBUILD=1 ;;
# i) TESTINSTALL=1 ;; t) COMMIT=--commit ;;
# u) UPLOADNOW="-u" ;; # u) UPLOADNOW="-u" ;;
# s) UPLOADNOW="-s" ;; # s) UPLOADNOW="-s" ;;
+?) echog "$name: options should not be preceded by a '+'." 1>&2; exit 2;; +?) echog "$name: options should not be preceded by a '+'." 1>&2; exit 2;;
...@@ -70,7 +71,7 @@ add_changelog_helper "- new version" $LISTNAMES ...@@ -70,7 +71,7 @@ add_changelog_helper "- new version" $LISTNAMES
#echo ${LISTRPMARGS/\-m/} @ ${LISTRPMARGS} @${LISTNAMES} #echo ${LISTRPMARGS/\-m/} @ ${LISTRPMARGS} @${LISTNAMES}
# We do not not pass args for myhsh here... # We do not not pass args for myhsh here...
# FIXME: # FIXME:
pack_src_rpm $(echo $LISTRPMARGS | sed -e "s|-[suUic]||g") pack_src_rpm $COMMIT $(echo $LISTRPMARGS | sed -e "s|-[suUic]||g")
set_specdir $LISTNAMES set_specdir $LISTNAMES
......
...@@ -102,7 +102,13 @@ uni_rpminstall() ...@@ -102,7 +102,13 @@ uni_rpminstall()
# build LISTBUILT list with src.rpm full path # build LISTBUILT list with src.rpm full path
pack_src_rpm() pack_src_rpm()
{ {
local i local i COMMIT
if [ "$1" = "--commit" ] ; then
shift
COMMIT="--commit"
fi
ARGS=$@ ARGS=$@
# NOTE: always nodeps # NOTE: always nodeps
# enable --nodeps for other ENV # enable --nodeps for other ENV
...@@ -134,10 +140,10 @@ do ...@@ -134,10 +140,10 @@ do
sleep 10 sleep 10
exit 1 exit 1
fi fi
uni_rpmbuild $i -bs $ARGS $NODEPS --target $DEFAULTARCH uni_rpmbuild $COMMIT $i -bs $ARGS $NODEPS --target $DEFAULTARCH
else else
echog "Just packing \$NAMESRPMIN" echog "Just packing \$NAMESRPMIN"
uni_rpmbuild $i -bs $ARGS $NODEPS --target $DEFAULTARCH || fatal "Error with rpmbuild" uni_rpmbuild $COMMIT $i -bs $ARGS $NODEPS --target $DEFAULTARCH || fatal "Error with rpmbuild"
fi fi
# Check the package really built # Check the package really built
......
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