automaint: added -v option to display explainatory messages on skipped packages

This commit is contained in:
Silvan Calarco 2013-07-12 02:03:09 +02:00
parent 77cfdacce8
commit a6bcf08a21

View File

@ -21,12 +21,13 @@ ${me[0]} ${me[1]}
"$"Batch automatic maintainance tool of the autodist suite.""
"$"Usage"":
$me [-s repository -d repository ] [-p repository] [-h]
$me [-s repository -d repository ] [-p repository] [-h] [-v]
-s repository "$"Automatic/Staging builds source repository
-d repository "$"Main destination repository
-p repository "$"Port repository
-h "$"Show this help and exit
-v "$"Verbose mode
"
}
@ -129,6 +130,8 @@ for ((i=1; i<=$#; i++)); do
-p) shift
PORT_REPOSITORY="${!i}"
;;
-v) VERBOSE=1
;;
-h|--help)
usage
exit 0
@ -169,6 +172,11 @@ for p in ${pkglist[0]}; do
spkg_release=$pkg_release
get_pkg_buildinfo $LOCAL_REPS_BASE_DIR/distromatic/$DEST_REPOSITORY ${ARCHS[0]} $p
[ "$pkg_name" ] || {
echo "$p: looks like a new package; skipping."
continue
}
if [ "$pkg_version" = "$spkg_version" ]; then
update_type="release"
else
@ -182,12 +190,12 @@ for p in ${pkglist[0]}; do
done
if [ "$i" = "${#SVER[*]}" ]; then
if [[ 64#${SVER[i-1]} -gt 64#89 && 64#${VER[i-1]} -lt 64#80 ]]; then
echo "$p: dubious beta upgrade from ${VER[i-1]} to ${SVER[i-1]}"
[ "$VERBOSE" ] && echo "$p: dubious beta upgrade from ${VER[i-1]} to ${SVER[i-1]}; skipping."
continue
fi
update_type="minor"
else
#echo "$p: dubios not-minor version update $i/${#SVER[*]}: ${SVER[i-1]} != ${VER[i-1]}"
[ "$VERBOSE" ] && echo "$p: dubious not-minor version update $i/${#SVER[*]}: ${SVER[i-1]} != ${VER[i-1]}; skipping."
continue
fi
fi