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
commitf1e2175d8acc39a68a855c8440c66a42b632ceff (patch)
treeed5549fbcf94882c26375ca92a39f85298b77f0a /bin/gen-DSA
parent2aba2f51029f00a7c2c271b4c7e1dd1290177c30 (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