run-parts --verbose $topdir/cron.d >> $log 2>&1
rm -f "${files}/cron.lock"
else
- echo "couldn't aquire lock file in due time" >> $log
+ echo "couldn't aquire cron lock file in due time" >> $log
fi
+date >> $log
+if lockfile -600 -r5 "${files}/changelogs.lock" >> $log 2>&1
+then
+ $topdir/bin/extract_changelogs >> $log 2>&1
+ rm -f "${files}/changelogs.lock"
+else
+ echo "couldn't aquire changelogs lock file in due time" >> $log
+fi
date >> $log
--- /dev/null
+#!/bin/bash
+
+. `dirname $0`/../config.sh
+
+if test -z "${localdir}"; then
+ echo skipping due to missing local archive
+ exit 1
+fi
+
+#set -e
+
+NOCPY_TEMPLATE=$topdir/etc/copyright_error
+NOCPY_BIN_TEMPLATE=$topdir/etc/copyright_error_bin
+
+logs="$topdir/files/logs"
+log="${logs}/changelogs.log"
+
+test -d "$logs" || mkdir -p "$logs"
+test -d "$tmpdir" || mkdir -p "$tmpdir"
+
+if [ -s "$log" ]
+then
+ savelog -c 14 "$log" > /dev/null
+fi
+
+(
+date
+
+for part in $parts; do
+ time "${bindir}/extract_files" -v -d "${localdir}/pool/$part/" \
+ -t "${htmldir}/changelogs/pool/$part/" \
+ -c "$configdir" -w "$tmpdir" \
+ --dumpfile "${filesdir}/changelogs.$part.dump" \
+ --cachefile "${filesdir}/changelogs.cache"
+done
+
+find "${htmldir}/changelogs/" -name log -cmin +7200 \
+ | while read logfile; do
+ dir=$(dirname "$logfile")
+ echo deleting $dir
+ rm -r "$dir"
+ rmdir --ignore-fail-on-non-empty $(dirname "$dir")
+done
+
+date
+) > $log 2>&1
# unset this if %SITE% moves somewhere where the packages files
# cannot be obtained locally
#
-#localdir=/org/ftp.debian.org/ftp
+localdir=/org/ftp.debian.org/
# path to private ftp directory
#ftproot=/org/ftp.root
+++ /dev/null
-#!/bin/bash
-
-exit 0
-
-. `dirname $0`/../config.sh
-
-if test -z "${localdir}"; then
- echo skipping due to missing local archive
- exit 1
-fi
-
-#set -e
-
-NOCPY_TEMPLATE=$topdir/etc/copyright_error
-NOCPY_BIN_TEMPLATE=$topdir/etc/copyright_error_bin
-
-logs="$topdir/files/logs"
-log="${logs}/changelogs.log"
-
-test -d "$logs" || mkdir -p "$logs"
-test -d "$tmpdir" || mkdir -p "$tmpdir"
-
-if [ -s "$log" ]
-then
- savelog -c 14 "$log" > /dev/null
-fi
-
-(
-date
-
-for part in $parts; do
- time "${bindir}/extract_files" -v -d "${localdir}/pool/$part/" \
- -t "${htmldir}/changelogs/pool/$part/" \
- -c "$configdir" -w "$tmpdir" \
- --dumpfile "${filesdir}/changelogs.$part.dump" \
- --cachefile "${filesdir}/changelogs.cache"
-done
-
-find "${htmldir}/changelogs/" -name log -cmin +7200 \
- | while read logfile; do
- dir=$(dirname "$logfile")
- echo deleting $dir
- rm -r "$dir"
- rmdir --ignore-fail-on-non-empty $(dirname "$dir")
-done
-
-date
-) > $log 2>&1