summaryrefslogtreecommitdiffstats
path: root/bin/gen-DSA
diff options
context:
space:
mode:
authorRaphael Geissert <geissert@debian.org>2014-08-10 21:39:34 +0000
committerRaphael Geissert <geissert@debian.org>2014-08-10 21:39:34 +0000
commita50072bfda441d212ff54836d984e4020fcdfc4b (patch)
treedf430c97c12f9cf62293c8b98ea46e4249533d76 /bin/gen-DSA
parent210709c8865e3fcbd11025b4575361366638e69f (diff)
make gen-DSA obtain the DSA id for regression updates
E.g. $ bin/gen-DSA acpi-support regression [...] Subject: [DSA 2984-2] acpi-support regression update git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@28199 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'bin/gen-DSA')
-rwxr-xr-xbin/gen-DSA22
1 files changed, 17 insertions, 5 deletions
diff --git a/bin/gen-DSA b/bin/gen-DSA
index 62427ebcac..9998c8509f 100755
--- a/bin/gen-DSA
+++ b/bin/gen-DSA
@@ -226,11 +226,23 @@ if $embargoed; then
fi
if [ -z "$DSAID" ]; then
- latest_dsa="$(sed -nr '/DSA-[0-9]+-1/{s/^.+DSA-[0]*([0-9]+).*$/\1/;p;q}' data/DSA/list)"
- dsa=$(($latest_dsa+1))
+ if [ "$TYPE" = regression ]; then
+ latest_dsa="$(sed -nr '/DSA-[0-9]+-[0-9]+'" $PACKAGE "'/{s/^.+DSA-[0]*([0-9-]+).*$/\1/;p;q}' data/DSA/list)"
+ revision=${latest_dsa#*-}
+ dsa=${latest_dsa%-*}
+ else
+ latest_dsa="$(sed -nr '/DSA-[0-9]+-1/{s/^.+DSA-[0]*([0-9]+).*$/\1/;p;q}' data/DSA/list)"
+ dsa=$(($latest_dsa+1))
+ revision=1
+ fi
+
c=0
- while dsa_exists "$dsa-1"; do
- dsa=$(($dsa+1))
+ while dsa_exists "$dsa-$revision"; do
+ if [ "$TYPE" = regression ]; then
+ revision=$(($revision+1))
+ else
+ dsa=$(($dsa+1))
+ fi
c=$(($c+1))
if [ $c -eq 10 ]; then
error "unable to find an unused DSA id after $c attempts" >&2
@@ -238,7 +250,7 @@ if [ -z "$DSAID" ]; then
exit 1
fi
done
- DSAID="$dsa-1"
+ DSAID="$dsa-$revision"
fi
if dsa_exists "$DSAID"; then

© 2014-2024 Faster IT GmbH | imprint | privacy policy