3
# Copyright 2009-2011 Canonical Ltd. This software is licensed under the
4
# GNU Affero General Public License version 3 (see the file LICENSE).
9
ARCHIVEROOT=${TEST_ARCHIVEROOT:-/srv/launchpad.net/ubuntu-archive/ubuntu}
10
MISCROOT=$ARCHIVEROOT/../ubuntu-misc
11
LOCKROOT=$ARCHIVEROOT/..
12
GERMINATEROOT=$ARCHIVEROOT/../ubuntu-germinate
14
LAUNCHPADROOT=${TEST_LAUNCHPADROOT:-/srv/launchpad.net/codelines/current}
15
GENERATE=$LAUNCHPADROOT/cronscripts/generate-extra-overrides.py
16
MAINTAINCE_CHECK=$LAUNCHPADROOT/cronscripts/publishing/maintenance-check.py
18
FLAVOURS="ubuntu kubuntu kubuntu-mobile edubuntu xubuntu mythbuntu lubuntu"
19
FLAVOURS="$FLAVOURS ubuntustudio"
21
## Check to see if another germinate run is in progress
23
LOCKFILE=$LOCKROOT/cron.germinate.lock
24
if lockfile -! -l 43200 -r 0 "${LOCKFILE}"; then
25
echo Another cron.germinate appears to be running
37
$GENERATE -d ubuntu $FLAVOURS
39
# Now generate the Supported extra overrides for all supported distros.
40
SUITES=`$LAUNCHPADROOT/scripts/ftpmaster-tools/lp-query-distro.py supported`
41
for supported_suite in $SUITES; do
42
echo -n "Running maintenance-check for $supported_suite... "
43
# The support timeframe information is stored here
44
SUPPORTED="$MISCROOT/more-extra.override.$supported_suite.main.supported"
45
# This is the target override file that contains germinate plus
47
TARGET="$MISCROOT/more-extra.override.$supported_suite.main"
48
# Debug/Log information
49
LOG="_maintenance-check.$supported_suite.stderr"
50
if $MAINTAINCE_CHECK $supported_suite > $SUPPORTED 2> $LOG; then
51
# The target file may be missing on the server and the script should
52
# not fail if that is the case.
54
# Remove old "Supported" info from extra-overrides as it may be
55
# stale now and we replace it with fresh content below.
56
sed /"^.* Supported"/d $TARGET > ${TARGET}.new
57
cat $SUPPORTED >> ${TARGET}.new
58
mv ${TARGET}.new $TARGET