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
commit5df0012df5d13afa7c4db4548845bab40aaa54e6 (patch)
tree6a204ee1411fad4ec144a6f1967108b659c112cd /bin/gen-DSA
parent8173800f90e44f889378428515388fa13ec116bb (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