autodist,update-specfile: support for update version as argument; cleanups

autodist-inspect: update repositories list
This commit is contained in:
Silvan Calarco 2024-04-13 14:08:06 +02:00
parent 6144945c31
commit cebe696e6e
3 changed files with 7 additions and 18 deletions

View File

@ -572,7 +572,7 @@ function launch_pkgs_loop() {
fi
fi
if [ -x $SCRIPT_UPDATE_SPECFILE ]; then
$SCRIPT_UPDATE_SPECFILE $spec_dir/$pkg.spec $SCRIPT_ARGS || {
$SCRIPT_UPDATE_SPECFILE $spec_dir/$pkg.spec ${passed_arguments/ *} $SCRIPT_ARGS || {
case $SEVERITY in
0) ;;
1) echo "%! Error: update-specfile script returned $?; skipping $pkg package."
@ -584,7 +584,7 @@ function launch_pkgs_loop() {
}
fi
if [ -x $SCRIPT_UPDATE_SPECFILE_CUSTOM ]; then
$SCRIPT_UPDATE_SPECFILE_CUSTOM $spec_dir/$pkg.spec $SCRIPT_ARGS || {
$SCRIPT_UPDATE_SPECFILE_CUSTOM $spec_dir/$pkg.spec ${passed_arguments/ *} $SCRIPT_ARGS || {
case $SEVERITY in
0) ;;
1) echo "%! Error: update-specfile-custom script returned $?; skipping $pkg package."
@ -792,20 +792,6 @@ function launch_pkgs_loop() {
mv $LOGFILE_PKG $LOGDIR/failed/
echo "?= See $LOGDIR/failed/${LOGFILE_PKG_NAME}"
[ "$do_autobuild" ] && autobuild_log $pkg $operation $ret $JOB_NAME $LOGDIR/failed/${LOGFILE_PKG_NAME}
case $operation in
autoupdate|update)
;;
build|buildinstall)
# copy new patches to sourcesdir for sharing
[ "$do_autobuild" ] && {
PATCHES=`diff $spec_dir/$pkg.spec $spec_dir/.$pkg.spec.autodist.preupdate | grep "> Patch" | sed "s|.*[[:space:]]\([^[:space:]]*\)|\1|"`
for p in $PATCHES; do
echo "== Copying patch $p to public dir"
[ -e $source_dir/$p ] && cp $source_dir/$p $SOURCESDIR/
done
}
;;
esac
[ $SEVERITY -gt 0 -a ! "$continue_on_error" ] && {
rm -f $tmpfile
return $ret

View File

@ -28,7 +28,7 @@ echo -e "\n=== distdb: ==="
grep -i $checkpkg ${LOCAL_REPS_BASE_DIR}/base/distdb
echo -e "\n=== legacy: ==="
grep -i $checkpkg ${LOCAL_REPS_BASE_DIR}/base/legacy
for repo in base devel-makedist devel-autodist devel-misc devel-future; do
for repo in base devel-makedist devel-autodist devel-misc devel-contrib devel-future; do
echo -e "\n=== ${repo}: ==="
ls ${LOCAL_REPS_BASE_DIR}/${repo}/SRPMS.base/*$checkpkg* 2>/dev/null
ls ${LOCAL_REPS_BASE_DIR}/${repo}/RPMS.*/*$checkpkg* 2>/dev/null

View File

@ -2,11 +2,12 @@
#
# Autodist script for updating specfiles
#
# Copyright (c) 2007-2014 by Silvan Calarco <silvan.calarco@mambasoft.it>
# Copyright (c) 2007-2024 by Silvan Calarco <silvan.calarco@mambasoft.it>
# Released with the same license as autodist
#
SPECFILE=
NEWVERSION=
BUILDREQNUM=0
for ((i=1; i<=$#; i++)); do
@ -31,6 +32,8 @@ for ((i=1; i<=$#; i++)); do
;;
*) if [ ! "$SPECFILE" ]; then
SPECFILE=${!i}
elif [ ! "$NEWVERSION" ]; then
NEWVERSION=${!i}
else
echo "ERROR: update-specfile: unrecognized script option: '${!i}'; aborting."
exit 1