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