autodist: don't raise error for missing $SYSCONFDIR/distdb*
First use repository distdb* if available or load $SYSCONFDIR/distdb* Use $SYSCONFDIR/distdb.d/*.db for adding local custom definitions.
This commit is contained in:
parent
159432b669
commit
7107f7884f
19
autodist
19
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.10
|
VERSION=0.9.11
|
||||||
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`
|
||||||
|
|
||||||
@ -842,11 +842,6 @@ 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 ] || {
|
[ -e $LOGBASEDIR ] || {
|
||||||
mkdir -p $LOGBASEDIR/prepare/{ok,failed}
|
mkdir -p $LOGBASEDIR/prepare/{ok,failed}
|
||||||
mkdir -p $LOGBASEDIR/update/{ok,failed}
|
mkdir -p $LOGBASEDIR/update/{ok,failed}
|
||||||
@ -859,15 +854,19 @@ function log_date() {
|
|||||||
# Main
|
# Main
|
||||||
#
|
#
|
||||||
|
|
||||||
|
DISTDBFILES=
|
||||||
|
|
||||||
DISTDB=`fetch_repository_file ${AUTODIST_REPOSITORY/-*}/distdb`
|
DISTDB=`fetch_repository_file ${AUTODIST_REPOSITORY/-*}/distdb`
|
||||||
[ "$DISTDB" ] || DISTDB=$SYSCONFDIR/distdb
|
[ "$DISTDB" ] && DISTDBFILES="$DISTDB"
|
||||||
DISTDBFILES="$DISTDB"
|
|
||||||
|
|
||||||
DISTDBARCH=`fetch_repository_file ${AUTODIST_REPOSITORY/-*}/distdb.$TARGETARCH`
|
DISTDBARCH=`fetch_repository_file ${AUTODIST_REPOSITORY/-*}/distdb.$TARGETARCH`
|
||||||
if [ "$DISTDBARCH" ]; then
|
if [ "$DISTDBARCH" ]; then
|
||||||
DISTDBFILES="$DISTDBFILES $DISTDBARCH"
|
DISTDBFILES="$DISTDBFILES $DISTDBARCH"
|
||||||
elif [ -e $DISTDB.$TARGETARCH ]; then
|
fi
|
||||||
DISTDBFILES="$DISTDBFILES $DISTDB.$TARGETARCH"
|
|
||||||
|
if [ ! "$DISTDBFILES" ]; then
|
||||||
|
[ -e $SYSCONFDIR/distdb ] && DISTDBFILES="$SYSCONFDIR/distdb"
|
||||||
|
[ -e $SYSCONFDIR/distdb.$TARGETARCH ] && DISTDBFILES="$DISTDBFILES $SYSCONFDIR/distdb.$TARGETARCH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$do_listjobs" ]; then
|
if [ "$do_listjobs" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user