]> git.decadent.org.uk Git - dak.git/commitdiff
dont hardcode testing/unstable names, use an extra var for dep11dir
authorJoerg Jaspert <joerg@debian.org>
Fri, 25 Dec 2015 22:17:20 +0000 (23:17 +0100)
committerJoerg Jaspert <joerg@debian.org>
Fri, 25 Dec 2015 22:17:20 +0000 (23:17 +0100)
config/debian/dinstall.functions
config/debian/dinstall.variables
config/debian/vars

index 5f1683befb870fb3b85c04e236e95a539fdecfcc..6e28b815f74cb6f7049a012abbb8d932a5c8f2bf 100644 (file)
@@ -87,7 +87,7 @@ function i18n1() {
             # Lets check!
             if ${scriptsdir}/ddtp-i18n-check.sh . ${scriptdir}/i18n/${TSTAMP}; then
                 # Yay, worked, lets copy around
-                for dir in stretch sid; do
+                for dir in ${extimportdists}; do
                     if [ -d dists/${dir}/ ]; then
                         cd dists/${dir}/main/i18n
                         rsync -aq --delete --delete-after --exclude Translation-en.bz2 --exclude Translation-*.diff/ . ${ftpdir}/dists/${dir}/main/i18n/.
@@ -112,20 +112,21 @@ function i18n1() {
 function dep11() {
     log "Synchronizing AppStream metadata"
     # First sync their newest data
-    mkdir -p ${scriptdir}/dep11
-    cd ${scriptdir}/dep11
+    local dep11dir="${scriptdir}/dep11"
+    mkdir -p ${dep11dir}
+    cd ${dep11dir}
     rsync -aq --delete --delete-after dep11-sync:/does/not/matter . || true
 
     # Lets check!
-    if ${scriptsdir}/dep11-basic-validate.py . ${scriptdir}/dep11/; then
+    if ${scriptsdir}/dep11-basic-validate.py . ${dep11dir}/; then
         # Yay, worked, lets copy around
-        for dir in stretch sid; do
+        for dir in ${extimportdists}; do
             if [ -d ${dir}/ ]; then
                 for comp in main contrib non-free; do
                     mkdir -p ${ftpdir}/dists/${dir}/${comp}/dep11
                     cd ${dir}/${comp}
                     rsync -aq --delete --delete-after --exclude *.tmp . ${ftpdir}/dists/${dir}/${comp}/dep11/.
-                    cd ${scriptdir}/dep11
+                    cd ${dep11dir}
                 done
             fi
         done
@@ -614,8 +615,8 @@ function logstats() {
 
 # save timestamp when we start
 function savetimestamp() {
-       NOW=`date "+%Y.%m.%d-%H:%M:%S"`
-       echo ${NOW} > "${dbdir}/dinstallstart"
+    NOW=`date "+%Y.%m.%d-%H:%M:%S"`
+    echo ${NOW} > "${dbdir}/dinstallstart"
 }
 
 function maillogfile() {
index 081a48c55f58ae6ba9f57577eddd014d6c83651c..0c1db1628131c2cc4f373752877a7e6359ac705d 100644 (file)
@@ -45,3 +45,13 @@ LOCK_CHANGELOG="$lockdir/changelog.lock"
 
 # Statefile for the users
 DINSTALLSTATE="${webdir}/dinstall.status"
+
+# dists for which we import external data (i18n, dep11)
+# as thats usually testing and unstable, but we need codenames,
+# get em out of the db.
+extimportdists=""
+for suite in testing unstable; do
+    codename=$(dak admin s show ${suite}|grep '^Codename')
+    codename=${codename##* }
+    extimportdists="${extimportdists} ${codename}"
+done
index 54d4af0060d39d6144ea6d407e010532f34fabac..aaa852f1c2cf5f5cad88e9b32184843a52ea0a18 100644 (file)
@@ -1,3 +1,4 @@
+# -*- mode:sh -*-
 # locations used by many scripts
 
 base=/srv/ftp-master.debian.org