]> git.decadent.org.uk Git - dak.git/commitdiff
Merge remote-tracking branch 'ansgar/pu/multiline-external-overrides' into merge
authorJoerg Jaspert <joerg@debian.org>
Thu, 16 Feb 2012 20:06:05 +0000 (21:06 +0100)
committerJoerg Jaspert <joerg@debian.org>
Thu, 16 Feb 2012 20:06:05 +0000 (21:06 +0100)
* ansgar/pu/multiline-external-overrides:
  byhand-tag: allow multiline fields
  drop mk-extra-overrides.sh script
  byhand-tag: do not rely on a entry for the directory in the tarball
  allow cruft report a bdo mode and use that in bdo cron.daily

Signed-off-by: Joerg Jaspert <joerg@debian.org>
config/backports/cron.daily
dak/cruft_report.py
scripts/debian/byhand-tag
scripts/debian/byhand-task
scripts/debian/mk-extra-overrides.sh [deleted file]

index 9175222337df86b37a47f68d1590a5b491ecffdb..147210c6a74d7fc816cc1a7c5241fb6c550113c5 100755 (executable)
@@ -16,7 +16,7 @@ dak clean-queues
 dak queue-report -d new,proposedupdates | mail -e -s "NEW and BYHAND on $(date +%D)" team@backports.debian.org
 # and one on crufty packages
 
-dak cruft-report > $webdir/cruft-report-daily.txt
+dak cruft-report -m bdo -s squeeze-backports > $webdir/cruft-report-daily.txt
 cat $webdir/cruft-report-daily.txt | mail -e -s "Debian backports archive cruft report for $(date +%D)" team@backports.debian.org
 
 echo Daily cron scripts successful.
index b200d7936a367bc5feb505aba11b5b1da2c34b63..f7650f986267f2b70ac40b8b7ef5590addfb7f52 100755 (executable)
@@ -58,7 +58,7 @@ def usage(exit_code=0):
 Check for obsolete or duplicated packages.
 
   -h, --help                show this help and exit.
-  -m, --mode=MODE           chose the MODE to run in (full or daily).
+  -m, --mode=MODE           chose the MODE to run in (full, daily, bdo).
   -s, --suite=SUITE         check suite SUITE.
   -w, --wanna-build-dump    where to find the copies of http://buildd.debian.org/stats/*.txt"""
     sys.exit(exit_code)
@@ -538,8 +538,10 @@ def main ():
         checks = [ "nbs", "nviu", "nvit", "obsolete source", "nfu" ]
     elif Options["Mode"] == "full":
         checks = [ "nbs", "nviu", "nvit", "obsolete source", "nfu", "dubious nbs", "bnb", "bms", "anais" ]
+    elif Options["Mode"] == "bdo":
+        checks = [ "nbs",  "obsolete source" ]
     else:
-        utils.warn("%s is not a recognised mode - only 'full' or 'daily' are understood." % (Options["Mode"]))
+        utils.warn("%s is not a recognised mode - only 'full', 'daily' or 'bdo' are understood." % (Options["Mode"]))
         usage(1)
 
     session = DBConn().session()
index 8dfa17a6a7eff6fed905eb328118524e24530336..d0674c84fec97ba70490a1d209fc432fa132077e 100755 (executable)
@@ -10,13 +10,13 @@ export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars
 INPUT="${1:?"Usage: $0 filename"}"
 
 # Regular expression used to validate tag lines
-CHECKRE='^[a-z0-9A-Z.+-]+[[:space:]]+Tag[[:space:]]+[a-z0-9:. ,{}+-]+$'
+CHECKRE='^([a-z0-9A-Z.+-]+[[:space:]]+Tag)?[[:space:]]+[a-z0-9:. ,{}+-]+$'
 
 # This must end with /
 TARGET=/srv/ftp-master.debian.org/scripts/external-overrides/
 
 # Read the main directory from the tarball
-DIR="`tar ztf \"$INPUT\" | tac | tail -n 1`"
+DIR="`tar ztf \"$INPUT\" | tail -n 1 | cut -d/ -f1`"
 
 # Create temporary files where to store the validated data
 umask 002
@@ -33,9 +33,9 @@ cleanup() {
 trap cleanup EXIT
 
 # Extract the data into the temporary files
-tar -O -zxf "$INPUT" "$DIR"tag | grep -E "$CHECKRE" > "$OUTMAIN"
-tar -O -zxf "$INPUT" "$DIR"tag.contrib | grep -E "$CHECKRE" > "$OUTCONTRIB"
-tar -O -zxf "$INPUT" "$DIR"tag.non-free | grep -E "$CHECKRE" > "$OUTNONFREE"
+tar -O -zxf "$INPUT" "$DIR"/tag | grep -E "$CHECKRE" > "$OUTMAIN"
+tar -O -zxf "$INPUT" "$DIR"/tag.contrib | grep -E "$CHECKRE" > "$OUTCONTRIB"
+tar -O -zxf "$INPUT" "$DIR"/tag.non-free | grep -E "$CHECKRE" > "$OUTNONFREE"
 
 # Move the data to the final location
 mv "$OUTMAIN"           "$TARGET"tag
@@ -44,7 +44,6 @@ mv "$OUTNONFREE"        "$TARGET"tag.non-free
 
 chmod 644 "$TARGET"tag "$TARGET"tag.contrib "$TARGET"tag.non-free
 
-(cd $TARGET && $scriptsdir/mk-extra-overrides.sh)
 (cd "$TARGET" \
   && dak external-overrides import unstable main Tag <tag \
   && dak external-overrides import unstable contrib Tag <tag.contrib \
index ee0c55144631db7a059ad337d105a482c26ab278..cd40167181dbe27fda86529a463172a4a8587985 100755 (executable)
@@ -64,7 +64,6 @@ mv "$OUTMAIN"           "$TARGET"task
 
 chmod 644 "$TARGET"task
 
-(cd $TARGET && $scriptsdir/mk-extra-overrides.sh)
 dak external-overrides import unstable main Task <"$TARGET"task
 dak external-overrides copy unstable testing
 
diff --git a/scripts/debian/mk-extra-overrides.sh b/scripts/debian/mk-extra-overrides.sh
deleted file mode 100755 (executable)
index e331e88..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-
-# regexp to test if a file is okay:
-#  grep -Ev '^[a-z0-9A-Z.+-]+\   Task    [a-z0-9:. ,+-]+$' task*
-
-x="build-essential tag task"
-opath="/srv/ftp-master.debian.org/scripts/override"
-apath="/srv/ftp-master.debian.org/ftp/dists"
-
-if [ ! -d "$apath" ]; then
-  echo "$0: invalid path to archive" >&2
-  exit 1
-elif [ ! -L "$apath/testing" ]; then
-  echo "$0: symlink for testing suite does not exist >&2"
-  exit 1
-fi
-
-codename_testing="$(basename "$(readlink "$apath/testing")")"
-if [ -z "$codename_testing" ] || [ ! -d "$apath/$codename_testing" ]; then
-  echo "$0: invalid codename for testing suite ('$codename_testing')" >&2
-  exit 1
-fi
-
-for s in "$codename_testing" sid; do
-  for c in main contrib non-free; do
-    echo "Making $opath/override.$s.extra.$c"
-    if [ "$c" = "main" ]; then
-      c2="";
-    else
-      c2=".$c"
-    fi
-    for t in $x; do
-      if [ -e "$t$c2" ]; then cat $t$c2; fi
-      if [ -e "$t.$s$c2" ]; then cat $t.$s$c2; fi
-    done | sort > $opath/override.$s.extra.$c
-  done
-done
-