summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorSalvatore Bonaccorso <carnil@debian.org>2020-06-20 10:43:29 +0200
committerSalvatore Bonaccorso <carnil@debian.org>2020-06-22 10:36:49 +0200
commitb19b43e35e0e1b2266c340f5d85edafd2ff0face (patch)
tree0e1ebdfcb20ea4b7b66ebbc9aa3d140706cba544 /bin
parent13c2511a59c0907e53b687936301d5ccd18c0aa2 (diff)
Introduce new pkgs_print() helper function
Depending on if a suffix should be included in the printout of the package set accordingly the format string for the printf invocation. The idea is depending on if only on release is supported the listing in the dsa-needed.txt should be either: -- pkg -- if only one suite is supported. In the case multiple suites are supported but the package needs an update only in one release, the listing should be -- $pkg/release -- Introduce helper function taking arguments as package, flag for suffix inclusion an to be used suffix. A later commit will use the new helper function where needed. Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/add-dsa-needed.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/add-dsa-needed.sh b/bin/add-dsa-needed.sh
index e38fdd653b..1de14aec65 100755
--- a/bin/add-dsa-needed.sh
+++ b/bin/add-dsa-needed.sh
@@ -34,6 +34,18 @@ cleanup() {
}
trap cleanup EXIT
+pkgs_print() {
+ local pkg=$1
+ local include_suffix=$2
+ local suffix=$3
+
+ if $include_suffix ; then
+ printf "%s/%s\n--\n" "$pkg" "$suffix"
+ else
+ printf "%s\n--\n" "$pkg"
+ fi
+}
+
output=data/dsa-needed.txt
case "${1:-}" in
--stdout)

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