Commit 677ea69a authored by Vitaly Lipatov's avatar Vitaly Lipatov

add -l option for lazy-cleanup after build

parent 4478635e
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
load_mod hasher load_mod hasher
############################# #############################
Usage="Usage: $name [-m -s -u -i -c] src.rpm..." Usage="Usage: $name [-m -s -u -i -c -l] src.rpm..."
function mygetopts() function mygetopts()
{ {
name=${0##*/} name=${0##*/}
...@@ -24,13 +24,16 @@ phelp() ...@@ -24,13 +24,16 @@ phelp()
echog "Options:" echog "Options:"
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)"
echog " -l - lazy cleanup (before build, not after)"
} }
while getopts :hmic opt; do while getopts :hmicl opt; do
case $opt in case $opt in
h) phelp; exit 0;; h) phelp; exit 0;;
i) TESTINSTALL=1;; i) TESTINSTALL=1;;
c) HASHERARG="--without-stuff $HASHERARG";; l) HASHERARG="$HASHERARG --lazy-cleanup";;
c) HASHERARG="$HASHERARG --without-stuff";;
+?) 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;;
# ?) echog "$name: $OPTARG: bad option. Use -h for help." 1>&2 ; exit 2;; # ?) echog "$name: $OPTARG: bad option. Use -h for help." 1>&2 ; exit 2;;
?) OPTIND=$((OPTIND-1)); break; ?) OPTIND=$((OPTIND-1)); break;
......
...@@ -41,12 +41,13 @@ phelp() ...@@ -41,12 +41,13 @@ phelp()
echog "$Descr" echog "$Descr"
echog "$Usage" echog "$Usage"
echog "Options:" echog "Options:"
echog " -s - sign package(s) and move it to upload dir" echog " -s - sign package(s) and move it to upload dir (ETERDESTSRPM)"
echog " -c - only sign package(s) with checking" echog " -c - only sign package(s) with checking"
echog " -u - sign package(s), upload it and run build" echog " -u - sign package(s), upload it and run build"
echog " -a TASK - sign package(s), update it and add to task TASK" echog " -a TASK - sign package(s), update it and add to task TASK"
# echog " -U - sign package(s) and upload it to Incoming (updates)" # echog " -U - sign package(s) and upload it to Incoming (updates)"
# echog " -d - remove package(s) from SRPMS and Incoming" # echog " -d - remove package(s) from SRPMS and Incoming"
echog " -l - lazy cleanup (before build, not after)"
echog " -n - do not check with sisyphus_check before upload" echog " -n - do not check with sisyphus_check before upload"
echog " -o - create nosrc.rpm package" echog " -o - create nosrc.rpm package"
echog " -z - create src.rpm with compatible gzip compression" echog " -z - create src.rpm with compatible gzip compression"
......
...@@ -33,19 +33,18 @@ phelp() ...@@ -33,19 +33,18 @@ phelp()
echog "Options:" echog "Options:"
echog " -r - remote build" echog " -r - remote build"
echog " -t - make temporary commit before build (rpmbb like behavior)" echog " -t - make temporary commit before build (rpmbb like behavior)"
echog " -u/-U - sign and upload after build" echog " -u - sign and upload after build"
echog " -s - sign and and copy to upload after build" echog " -s - sign and and copy to upload dir (ETERDESTSRPM) after build"
echog " -i - install built packages in test hasher" echog " -i - install built packages in test hasher"
echog " -l - lazy cleanup (before build, not after)"
echog " -c - build without stuff (previous built packages)" echog " -c - build without stuff (previous built packages)"
} }
while getopts :hrusimt opt; do while getopts :hrulsimt opt; do
case $opt in case $opt in
h) phelp; exit 0;; h) phelp; exit 0;;
r) REMOTEBUILD=1 ;; r) REMOTEBUILD=1 ;;
t) COMMIT=--commit ;; t) COMMIT="--commit" ;;
# u) UPLOADNOW="-u" ;;
# 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;;
# ?) echog "$name: $OPTARG: bad option. Use -h for help." 1>&2 ; exit 2;; # ?) echog "$name: $OPTARG: bad option. Use -h for help." 1>&2 ; exit 2;;
?) OPTIND=$((OPTIND-1)); break; ?) OPTIND=$((OPTIND-1)); break;
...@@ -70,13 +69,15 @@ fi ...@@ -70,13 +69,15 @@ fi
parse_cmd_pre "$@" parse_cmd_pre "$@"
mygetopts $LISTARGS mygetopts $LISTARGS
[ -n "$LISTNAMES" ] || fatal "Run with exists specs as arg"
# TODO: skip for prev. packed src.rpm # TODO: skip for prev. packed src.rpm
# If fail, we already has correct changelog # If fail, we already has correct changelog
add_changelog_helper "- new version" $LISTNAMES add_changelog_helper "- new version" $LISTNAMES
# We do not not pass args for myhsh here... # We do not not pass args for myhsh here...
# FIXME: # FIXME:
pack_src_rpm $COMMIT $(echo $LISTRPMARGS | sed -e "s|-[suUic]||g") pack_src_rpm $COMMIT $(echo $LISTRPMARGS | sed -e "s|-[suUicl]||g")
# TODO: skip for prev. packed src.rpm # TODO: skip for prev. packed src.rpm
set_specdir $LISTNAMES set_specdir $LISTNAMES
......
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