2 # No way I try to deal with a crippled sh just for POSIX foo.
4 # Copyright (C) 2009 Joerg Jaspert <joerg@debian.org>
6 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License as
8 # published by the Free Software Foundation; version 2.
10 # This program is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 # make sure to only use defined variables
23 # ERR traps should be inherited from functions too. (And command
24 # substitutions and subshells and whatnot, but for us the functions is
25 # the important part here)
28 # import the general variable set.
29 export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars
33 LOCKFILE="$lockdir/unchecked.lock"
34 LOCK_NEW="$lockdir/processnew.lock"
35 NOTICE="$lockdir/daily.lock"
36 LOCK_BUILDD="$lockdir/buildd.lock"
41 if [ -e $NOTICE ]; then
45 ########################################################################
47 ########################################################################
48 # common functions are "outsourced"
49 . "${configdir}/common"
51 STAMP=$(date "+%Y%m%d%H%M")
55 if [ ! -z "$LOCKDAILY" ]; then
60 function do_buildd () {
61 if lockfile -r3 $NOTICE; then
64 dak make-overrides &>/dev/null
65 rm -f override.sid.all3 override.sid.all3.src
66 for i in main contrib non-free main.debian-installer; do
67 cat override.sid.$i >> override.sid.all3
68 if [ "$i" != "main.debian-installer" ]; then
69 cat override.sid.$i.src >> override.sid.all3.src
77 function do_dists () {
79 #dak generate-filelist -s unstable,experimental -i
80 dak generate-packages-sources2 -s unstable experimental >/dev/null
83 ########################################################################
84 # the actual unchecked functions follow #
85 ########################################################################
87 # And use one locale, no matter what the caller has set
91 # only run one cron.unchecked
92 if ! lockfile -r8 $LOCKFILE; then
93 echo "aborting cron.unchecked because $LOCKFILE has already been locked"
99 pg_timestamp preunchecked >/dev/null
101 # Process policy queues
102 punew proposedupdates
103 opunew oldproposedupdates
105 # Now process the NEW staging area
108 # Finally deal with unchecked
111 if [ ! -z "$changes" ]; then
117 dak contents -l 10000 scan-binary
118 dak contents -l 1000 scan-source
119 pg_timestamp postunchecked >/dev/null