From 4991bee45e47968e11bcfa7164cd67f5a1d7b2ab Mon Sep 17 00:00:00 2001 From: Emilio Pozuelo Monfort Date: Wed, 3 Nov 2021 13:25:33 +0100 Subject: gen-DSA: only call remove-cve-dist-tags once And do it after we've asked for all the versions. Calling the script after asking for each version and before asking for the next is annoying as the script takes some time due to the size of CVE/list. This way not only do we avoid that wait between user inputs, but we also avoid calling the script and thus parsing CVE/list multiple times. --- bin/gen-DSA | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/gen-DSA b/bin/gen-DSA index 2e47b58e35..781d4250cc 100755 --- a/bin/gen-DSA +++ b/bin/gen-DSA @@ -357,6 +357,8 @@ for dist in $RELEASES; do setvar $dist done +DISTS= + for dist in $CODENAMES; do version="$(eval 'printf "%s" "$'"$dist"_VERSION'"')" if $save && [ -z "$version" ] && grep -q "${dist}_VERSION" "$tmpf"; then @@ -367,9 +369,11 @@ for dist in $CODENAMES; do fi fi [ -z "$version" ] || setvar "${dist}_VERSION" "$version" - [ -z "$version" ] || bin/remove-cve-dist-tags "${dist}" "${PACKAGE}" ${CVE} + [ -z "$version" ] || DISTS="${DISTS},${dist}" done +bin/remove-cve-dist-tags "${DISTS#,}" "${PACKAGE}" ${CVE} + if ! $save; then cat $tmpf echo -- cgit v1.2.3