From 8ef83835c068d41a209879963bbb92212ece8e2f Mon Sep 17 00:00:00 2001 From: Michal Suchanek Date: Feb 19 2024 11:42:36 +0000 Subject: compute-PATCHVERSION: Do not produce output when awk fails compute-PATCHVERSION uses awk to produce a shell script that is subsequently executed to update shell variables which are then printed as the patchversion. Some versions of awk, most notably bysybox-gawk do not understand the awk program and fail to run. This results in no script generated as output, and printing the initial values of the shell variables as the patchversion. When the awk program fails to run produce 'exit 1' as the shell script to run instead. That prevents printing the stale values, generates no output, and generates invalid rpm spec file down the line. Then the problem is flagged early and should be easier to diagnose. --- diff --git a/rpm/compute-PATCHVERSION.sh b/rpm/compute-PATCHVERSION.sh index 14781fb..08ba010 100755 --- a/rpm/compute-PATCHVERSION.sh +++ b/rpm/compute-PATCHVERSION.sh @@ -64,13 +64,13 @@ done >"$series" < <($(dirname $0)/guards $EXTRA_SYMBOLS