autodist: make --list-jobs and --list-pkgs faster by running before reading unneeded package status from repository
This commit is contained in:
parent
7a268ce0c8
commit
c0b7304aa4
66
autodist
66
autodist
@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
# Released under the terms of the GNU GPL release 3 license
|
# Released under the terms of the GNU GPL release 3 license
|
||||||
#
|
#
|
||||||
VERSION=0.9.9
|
VERSION=0.9.10
|
||||||
me=(${0##*/} $VERSION "Sat Aug 20 2010")
|
me=(${0##*/} $VERSION "Sat Aug 20 2010")
|
||||||
exec 3>`readlink /proc/self/fd/0`
|
exec 3>`readlink /proc/self/fd/0`
|
||||||
|
|
||||||
@ -220,12 +220,6 @@ done
|
|||||||
[ "$SEND_SERVER" ] || SEND_SERVER=$AUTODIST_REPOSITORY
|
[ "$SEND_SERVER" ] || SEND_SERVER=$AUTODIST_REPOSITORY
|
||||||
|
|
||||||
SEND_SERVER_CMD="--server $SEND_SERVER"
|
SEND_SERVER_CMD="--server $SEND_SERVER"
|
||||||
AUTOUPDATEDIR=${LOCAL_REPS_BASE_DIR}/$AUTODIST_REPOSITORY/autoupdate/
|
|
||||||
|
|
||||||
[ -r $AUTOUPDATEDIR ] || {
|
|
||||||
AUTOUPDATEDIR=$USERCONFDIR/$AUTODIST_REPOSITORY/autoupdate
|
|
||||||
mkdir -p $AUTOUPDATEDIR
|
|
||||||
}
|
|
||||||
|
|
||||||
# perform arch names conversions
|
# perform arch names conversions
|
||||||
case $BUILDARCH in
|
case $BUILDARCH in
|
||||||
@ -236,34 +230,6 @@ case $TARGETARCH in
|
|||||||
i386|i486|i686) TARGETARCH=i586 ;;
|
i386|i486|i686) TARGETARCH=i586 ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
SOURCESDIR=$AUTOUPDATEDIR/sources/
|
|
||||||
SUCCESSLISTDIR=$AUTOUPDATEDIR
|
|
||||||
SKIPPEDLISTDIR=$AUTOUPDATEDIR
|
|
||||||
|
|
||||||
SRCPKGLIST=`fetch_repository_list $AUTODIST_REPOSITORY/srcpkglist`
|
|
||||||
[ "$AUTODIST_DELAYED_REPOSITORY" ] && SRCPKGLIST_DELAYED=`fetch_repository_list $AUTODIST_DELAYED_REPOSITORY/srcpkglist`
|
|
||||||
|
|
||||||
BUILDSLIST=`fetch_repository_list distromatic/$AUTODIST_REPOSITORY/builds-$TARGETARCH`
|
|
||||||
[ "$AUTODIST_DELAYED_REPOSITORY" ] && BUILDSLIST_DELAYED=`fetch_repository_list distromatic/$AUTODIST_DELAYED_REPOSITORY/builds-$TARGETARCH`
|
|
||||||
|
|
||||||
[ -e "$DISTDB" ] || {
|
|
||||||
echo "ERROR: missing distdb file $DISTDB; aborting."
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
[ -e $LOGBASEDIR ] || {
|
|
||||||
mkdir -p $LOGBASEDIR/prepare/{ok,failed}
|
|
||||||
mkdir -p $LOGBASEDIR/update/{ok,failed}
|
|
||||||
mkdir -p $LOGBASEDIR/build/{ok,failed}
|
|
||||||
mkdir -p $LOGBASEDIR/install/{ok,failed}
|
|
||||||
mkdir -p $LOGBASEDIR/send/{ok,failed}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[ "$PACKAGE" ] || {
|
|
||||||
# echo "ERROR: missing target; aborting."
|
|
||||||
# usage
|
|
||||||
# exit 1
|
|
||||||
#}
|
|
||||||
|
|
||||||
# for webbuild message
|
# for webbuild message
|
||||||
function cgi_encodevar() {
|
function cgi_encodevar() {
|
||||||
@ -880,6 +846,19 @@ function log_date() {
|
|||||||
echo -n `LANG=C date +%Y%m%d@%H%M%S`
|
echo -n `LANG=C date +%Y%m%d@%H%M%S`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[ -e "$DISTDB" ] || {
|
||||||
|
echo "ERROR: missing distdb file $DISTDB; aborting."
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
[ -e $LOGBASEDIR ] || {
|
||||||
|
mkdir -p $LOGBASEDIR/prepare/{ok,failed}
|
||||||
|
mkdir -p $LOGBASEDIR/update/{ok,failed}
|
||||||
|
mkdir -p $LOGBASEDIR/build/{ok,failed}
|
||||||
|
mkdir -p $LOGBASEDIR/install/{ok,failed}
|
||||||
|
mkdir -p $LOGBASEDIR/send/{ok,failed}
|
||||||
|
}
|
||||||
|
|
||||||
DISTDBFILES="$DISTDB"
|
DISTDBFILES="$DISTDB"
|
||||||
[ -e $DISTDB.$TARGETARCH ] && DISTDBFILES="$DISTDBFILES $DISTDB.$TARGETARCH"
|
[ -e $DISTDB.$TARGETARCH ] && DISTDBFILES="$DISTDBFILES $DISTDB.$TARGETARCH"
|
||||||
[ -e ~/.autodist/distdb ] && DISTDBFILES="$DISTDBFILES ~/.autodist/distdb"
|
[ -e ~/.autodist/distdb ] && DISTDBFILES="$DISTDBFILES ~/.autodist/distdb"
|
||||||
@ -931,6 +910,23 @@ for a in $LOGBASEDIR/{,prepare/{,ok,failed},update/{,ok,failed},build/{,ok,faile
|
|||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
AUTOUPDATEDIR=${LOCAL_REPS_BASE_DIR}/$AUTODIST_REPOSITORY/autoupdate/
|
||||||
|
[ -r $AUTOUPDATEDIR ] || {
|
||||||
|
AUTOUPDATEDIR=$USERCONFDIR/$AUTODIST_REPOSITORY/autoupdate
|
||||||
|
mkdir -p $AUTOUPDATEDIR
|
||||||
|
}
|
||||||
|
|
||||||
|
SOURCESDIR=$AUTOUPDATEDIR/sources/
|
||||||
|
SUCCESSLISTDIR=$AUTOUPDATEDIR
|
||||||
|
SKIPPEDLISTDIR=$AUTOUPDATEDIR
|
||||||
|
|
||||||
|
SRCPKGLIST=`fetch_repository_list $AUTODIST_REPOSITORY/srcpkglist`
|
||||||
|
[ "$AUTODIST_DELAYED_REPOSITORY" ] && SRCPKGLIST_DELAYED=`fetch_repository_list $AUTODIST_DELAYED_REPOSITORY/srcpkglist`
|
||||||
|
|
||||||
|
BUILDSLIST=`fetch_repository_list distromatic/$AUTODIST_REPOSITORY/builds-$TARGETARCH`
|
||||||
|
[ "$AUTODIST_DELAYED_REPOSITORY" ] && BUILDSLIST_DELAYED=`fetch_repository_list distromatic/$AUTODIST_DELAYED_REPOSITORY/builds-$TARGETARCH`
|
||||||
|
|
||||||
|
|
||||||
echo "%% Autodist started with PID $$ @ `LANG=C date`"
|
echo "%% Autodist started with PID $$ @ `LANG=C date`"
|
||||||
|
|
||||||
# autobuild: add jobs ordered by oldest builds
|
# autobuild: add jobs ordered by oldest builds
|
||||||
|
Loading…
Reference in New Issue
Block a user