autodist-tool: use autodist --list-jobs instead of directly reading DISTDB
This commit is contained in:
parent
a59ea180af
commit
56f41ede80
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# autodist-tool
|
# autodist-tool
|
||||||
# Copyright (c) 2008-2012 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
# Copyright (c) 2008-2014 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||||
#
|
#
|
||||||
. /etc/autodist/config
|
. /etc/autodist/config
|
||||||
me=(${0##*/} $VERSION "Tue Oct 28 2008")
|
me=(${0##*/} $VERSION "Tue Oct 28 2008")
|
||||||
@ -14,7 +14,6 @@ SOURCESDIR=$AUTOUPDATEDIR/sources/
|
|||||||
SRCPKGLIST=/var/ftp/pub/openmamba/$AUTODIST_REPOSITORY/srcpkglist
|
SRCPKGLIST=/var/ftp/pub/openmamba/$AUTODIST_REPOSITORY/srcpkglist
|
||||||
SUCCESSLISTDIR=$AUTOUPDATEDIR
|
SUCCESSLISTDIR=$AUTOUPDATEDIR
|
||||||
SKIPPEDLISTDIR=$AUTOUPDATEDIR
|
SKIPPEDLISTDIR=$AUTOUPDATEDIR
|
||||||
DISTDBFILE=/etc/autodist/distdb
|
|
||||||
|
|
||||||
#eval `autospec -q --eval="srpms_dir"`
|
#eval `autospec -q --eval="srpms_dir"`
|
||||||
#eval `autospec -q --eval="rpms_dir"`
|
#eval `autospec -q --eval="rpms_dir"`
|
||||||
@ -133,7 +132,7 @@ elif [ "$COMMAND" = "schedule" ]; then
|
|||||||
# while read line; do
|
# while read line; do
|
||||||
# set -- $line
|
# set -- $line
|
||||||
# if [ "`echo \" $1 \" | grep \" $JOB \"`" ]; then
|
# if [ "`echo \" $1 \" | grep \" $JOB \"`" ]; then
|
||||||
if [ "`grep \"^$JOB \" $SRCPKGLIST`" -o "`grep \"^$JOB=(\" $DISTDBFILE`" ]; then
|
if [ "`grep \"^$JOB \" $SRCPKGLIST`" -o "`autodist --list-jobs | grep ^$JOB$`" ]; then
|
||||||
echo "Job $JOB scheduled for automatic update or rebuild"
|
echo "Job $JOB scheduled for automatic update or rebuild"
|
||||||
sed -i "/^$JOB .*/d" $AUTOUPDATEDIR/manual.in
|
sed -i "/^$JOB .*/d" $AUTOUPDATEDIR/manual.in
|
||||||
echo "$JOB $JOBVER 0" >> $AUTOUPDATEDIR/manual.in || exit 1
|
echo "$JOB $JOBVER 0" >> $AUTOUPDATEDIR/manual.in || exit 1
|
||||||
@ -165,7 +164,7 @@ elif [ "$COMMAND" = "skip" ]; then
|
|||||||
if [ "$SKIPPEDLINE" ]; then
|
if [ "$SKIPPEDLINE" ]; then
|
||||||
sed -i "/^$PKGNAME /d" $SKIPPEDLISTDIR/*.skip
|
sed -i "/^$PKGNAME /d" $SKIPPEDLISTDIR/*.skip
|
||||||
fi
|
fi
|
||||||
if [ "`grep \"^$JOB \" $SRCPKGLIST`" -o "`grep \"^$JOB=(\" $DISTDBFILE`" ]; then
|
if [ "`grep \"^$JOB \" $SRCPKGLIST`" -o "`autodist --list-jobs | grep ^$JOB$`" ]; then
|
||||||
echo "$JOB $DATE_NOW 101" >> $SKIPPEDLISTDIR/auto.skip
|
echo "$JOB $DATE_NOW 101" >> $SKIPPEDLISTDIR/auto.skip
|
||||||
echo "Job $JOB skipped from automatic builds"
|
echo "Job $JOB skipped from automatic builds"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user