From fe2e3f8f2d030fd8c6f495693fa6a2d4a9a6118c Mon Sep 17 00:00:00 2001 From: Joerg Jaspert Date: Fri, 25 Dec 2015 23:17:20 +0100 Subject: [PATCH] dont hardcode testing/unstable names, use an extra var for dep11dir --- config/debian/dinstall.functions | 17 +++++++++-------- config/debian/dinstall.variables | 10 ++++++++++ config/debian/vars | 1 + 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/config/debian/dinstall.functions b/config/debian/dinstall.functions index 5f1683be..6e28b815 100644 --- a/config/debian/dinstall.functions +++ b/config/debian/dinstall.functions @@ -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() { diff --git a/config/debian/dinstall.variables b/config/debian/dinstall.variables index 081a48c5..0c1db162 100644 --- a/config/debian/dinstall.variables +++ b/config/debian/dinstall.variables @@ -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 diff --git a/config/debian/vars b/config/debian/vars index 54d4af00..aaa852f1 100644 --- a/config/debian/vars +++ b/config/debian/vars @@ -1,3 +1,4 @@ +# -*- mode:sh -*- # locations used by many scripts base=/srv/ftp-master.debian.org -- 2.39.5