]> git.decadent.org.uk Git - dak.git/commitdiff
Move 3 update- scripts into dinstall.functions/tasks proper
authorJoerg Jaspert <joerg@debian.org>
Thu, 31 Dec 2015 22:05:40 +0000 (23:05 +0100)
committerJoerg Jaspert <joerg@debian.org>
Thu, 31 Dec 2015 22:05:40 +0000 (23:05 +0100)
config/debian/dinstall.functions
config/debian/dinstall.tasks
config/debian/dinstall.variables
scripts/debian/update-mailingliststxt [deleted file]
scripts/debian/update-mirrorlists [deleted file]
scripts/debian/update-pseudopackages.sh [deleted file]

index f4a1ef3e5460552c7514c9030d62bc9cac41a944..acfbee4de6fb265029655274ce9923a60eb0d04d 100644 (file)
@@ -56,14 +56,48 @@ function qa1() {
     ssh -n -2 -i ~dak/.ssh/push_merkel_qa  -o BatchMode=yes -o SetupTimeOut=90 -o ConnectTimeout=90 qa@qa.debian.org sleep 1
 }
 
+function mirrorlists() {
+    local mldir="${scriptdir}/mirrorlist"
+    local masterlist=${mldir}/Mirrors.masterlist
+
+    cd ${mldir}
+
+    [[ -f ${HOME}/.cvspass ]] || touch ${HOME}/.cvspass
+
+    grep -q "anonscm.debian.org:/cvs/webwml" ~/.cvspass || \
+       echo ":pserver:anonymous@anonscm.debian.org:/cvs/webwml A" >> ${HOME}/.cvspass
+
+    cvs update
+
+    if [[ ! -f ${ftpdir}/README.mirrors.html ]] || [[ ${masterlist} -nt ${ftpdir}/README.mirrors.html ]]; then
+       rm -f ${ftpdir}/README.mirrors.{html,txt}
+       ${mldir}/mirror_list.pl -m ${masterlist} -t html > ${ftpdir}/README.mirrors.html
+       ${mldir}/mirror_list.pl -m ${masterlist} -t text > ${ftpdir}/README.mirrors.txt
+       log Updated archive version of mirrors file
+    fi
+}
+
+function mailingliststxt() {
+    cd ${ftpdir}/doc
+
+    log "Updating archive version of mailing-lists.txt"
+    wget ${wgetopts} https://www.debian.org/misc/mailing-lists.txt
+}
+
+function pseudopackages() {
+    cd ${scriptdir}/masterfiles
+
+    log "Updating archive version of pseudo-packages"
+    for file in maintainers description; do
+       wget ${wgetopts} https://bugs.debian.org/pseudopackages/pseudo-packages.${file}
+    done
+}
+
 # Updating various files
-function updates() {
-    log "Updating Bugs docu, Mirror list and mailing-lists.txt"
+function bugdoctxt() {
+    log "Updating Bugs docu"
     cd $configdir
     $scriptsdir/update-bugdoctxt
-    $scriptsdir/update-mirrorlists
-    $scriptsdir/update-mailingliststxt
-    $scriptsdir/update-pseudopackages.sh
 }
 
 # The first i18n one, syncing new descriptions
index a817b8a8bd70bfaed7b6d936dedd6956ac2c85f8..6c470e2c5fdf22a63a496f1985abdb556b63c97f 100644 (file)
@@ -2,8 +2,12 @@
 STATE                  startup                    none                       false   false
 NOSTAGE                startup                    none                       false   false
 savetimestamp          none                       none                       false   false
-updates                none                       External\ Updates          false   false
+qa1                    none                       init                       false   true
 pg_timestamp           predinstall                pg_dump1                   true    false
+bugdoctxt              none                       External\ Updates          false   true
+mirrorlists            none                       none                       false   true
+mailingliststxt        none                       none                       false   true
+pseudopackages         none                       none                       false   true
 i18n1                  none                       i18n\ 1                    false   false
 dep11                  none                       dep11\ 1                   false   false
 NOSTAGE                lockaccepted               none                       false   false
index c4efabebfd05e92bda5863c4ea80c6d360019f74..092588198b28e82d0066bbc949f79edb986bf3f2 100644 (file)
@@ -52,3 +52,6 @@ for suite in testing unstable; do
     codename=${codename##* }
     extimportdists="${extimportdists} ${codename}"
 done
+
+# Common wget options
+wgetopts="-t2 -T20 -q -N --ca-directory=/etc/ssl/ca-debian"
diff --git a/scripts/debian/update-mailingliststxt b/scripts/debian/update-mailingliststxt
deleted file mode 100755 (executable)
index 9005a51..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-#
-# Fetches latest copy of mailing-lists.txt
-# Michael Beattie <mjb@debian.org>
-
-set -e
-
-export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars
-. $SCRIPTVARS
-
-cd $ftpdir/doc
-
-echo Updating archive version of mailing-lists.txt
-wget -t1 -T20 -q -N --ca-directory=/etc/ssl/ca-debian https://www.debian.org/misc/mailing-lists.txt || \
-  echo "Some error occured..."
-
diff --git a/scripts/debian/update-mirrorlists b/scripts/debian/update-mirrorlists
deleted file mode 100755 (executable)
index a711d8a..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-#
-# Very Very hackish script...  dont laugh.
-# Michael Beattie <mjb@debian.org>
-
-set -e
-
-export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars
-. $SCRIPTVARS
-
-prog=$scriptdir/mirrorlist/mirror_list.pl
-masterlist=$scriptdir/mirrorlist/Mirrors.masterlist
-
-test ! -f $HOME/.cvspass && touch $HOME/.cvspass
-
-grep -q "anonscm.debian.org:/cvs/webwml" ~/.cvspass || \
-       echo ":pserver:anonymous@anonscm.debian.org:/cvs/webwml A" >> $HOME/.cvspass
-
-cd $(dirname $masterlist)
-cvs update
-
-if [ ! -f $ftpdir/README.mirrors.html -o $masterlist -nt $ftpdir/README.mirrors.html ] ; then
-       rm -f $ftpdir/README.mirrors.html $ftpdir/README.mirrors.txt
-       $prog -m $masterlist -t html > $ftpdir/README.mirrors.html
-       $prog -m $masterlist -t text > $ftpdir/README.mirrors.txt
-       echo Updated archive version of mirrors file
-fi
diff --git a/scripts/debian/update-pseudopackages.sh b/scripts/debian/update-pseudopackages.sh
deleted file mode 100755 (executable)
index 10c7bba..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-#
-# Fetches latest copy of pseudo-packages
-# Joerg Jaspert <joerg@debian.org>
-
-set -e
-
-export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars
-. $SCRIPTVARS
-
-cd ${scriptdir}/masterfiles
-
-echo Updating archive version of pseudo-packages
-for file in maintainers description; do
-       wget -t2 -T20 -q -N --ca-directory=/etc/ssl/ca-debian https://bugs.debian.org/pseudopackages/pseudo-packages.${file} || echo "Some error occured with $file..."
-done