autoport: fetch repfiles for all archs but only if local files are older than 60 minutes
This commit is contained in:
parent
0d5bc034b1
commit
096b6d6f69
24
autoport
24
autoport
@ -6,7 +6,6 @@
|
||||
#
|
||||
VERSION=1.3
|
||||
|
||||
BASE_ARCH=i586
|
||||
BASE_REPOSITORY=base
|
||||
PORT_REPOSITORY=base
|
||||
|
||||
@ -242,16 +241,23 @@ function find_requirements() {
|
||||
fetch_repfiles() {
|
||||
local u
|
||||
|
||||
[ "$VERBOSE_MODE" = "1" ] && echo "Fetching ${REPS_BASE_URL}/$PORT_REPOSITORY/srcpkglist"
|
||||
curl -f -L -s ${REPS_BASE_URL}/$PORT_REPOSITORY/srcpkglist -o $DATADIR/$PORT_REPOSITORY/srcpkglist ||
|
||||
echo "Warning: unable to fetch ${REPS_BASE_URL}/$PORT_REPOSITORY/srcpkglist"
|
||||
f=${DATADIR}/${PORT_REPOSITORY}/srcpkglist
|
||||
if [ ! -e ${f} -o "`find ${f} -mmin +60 2>/dev/null`" ]; then
|
||||
[ "$VERBOSE_MODE" = "1" ] && echo "Fetching ${REPS_BASE_URL}/$PORT_REPOSITORY/srcpkglist"
|
||||
curl -f -L -s ${REPS_BASE_URL}/$PORT_REPOSITORY/srcpkglist -o ${f} ||
|
||||
echo "Warning: unable to fetch ${REPS_BASE_URL}/$PORT_REPOSITORY/srcpkglist"
|
||||
fi
|
||||
for a in ${AUTODIST_ARCHS[*]}; do
|
||||
if [ "$a" == "${TARGET_ARCH}" ]; then
|
||||
f=${DATADIR}/${PORT_REPOSITORY}/sources-${a}
|
||||
if [ ! -e ${f} -o "`find ${f} -mmin +60 2>/dev/null`" ]; then
|
||||
[ "$VERBOSE_MODE" = "1" ] && echo "Fetching $PORT_REPOSITORY_DISTROMATIC_URL/sources-${a}"
|
||||
curl -f -L -s $PORT_REPOSITORY_DISTROMATIC_URL/sources-${a} -o $DATADIR/$PORT_REPOSITORY/sources-${a} ||
|
||||
curl -f -L -s $PORT_REPOSITORY_DISTROMATIC_URL/sources-${a} -o ${f} ||
|
||||
echo "Warning: unable to fetch $PORT_REPOSITORY_DISTROMATIC_URL/sources-${a}"
|
||||
fi
|
||||
f=${DATADIR}/${PORT_REPOSITORY}/builds-${a}.sh
|
||||
if [ ! -e ${f} -o "`find ${f} -mmin +60 2>/dev/null`" ]; then
|
||||
[ "$VERBOSE_MODE" = "1" ] && echo "Fetching $PORT_REPOSITORY_DISTROMATIC_URL/builds-${a}.sh"
|
||||
curl -f -L -s $PORT_REPOSITORY_DISTROMATIC_URL/builds-${a}.sh -o $DATADIR/$PORT_REPOSITORY/builds-${a}.sh ||
|
||||
curl -f -L -s $PORT_REPOSITORY_DISTROMATIC_URL/builds-${a}.sh -o ${f} ||
|
||||
echo "Warning: unable to fetch $PORT_REPOSITORY_DISTROMATIC_URL/builds-${a}.sh"
|
||||
fi
|
||||
done
|
||||
@ -386,10 +392,6 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
||||
echo "Port repository is $PORT_REPOSITORY"
|
||||
echo "Release repository is $DEST_REPOSITORY"
|
||||
|
||||
# old files cleanup
|
||||
rm -f $DATADIR/$PORT_REPOSITORY/sources-*
|
||||
rm -f $DATADIR/$PORT_REPOSITORY/builds-*.sh
|
||||
|
||||
fetch_repfiles
|
||||
|
||||
[ "$AUTO_MODE" -a -e $DATAARCHDIR/last ] && . $DATAARCHDIR/last
|
||||
|
Loading…
Reference in New Issue
Block a user