summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rwxr-xr-xbuild-aux/announce-gen8
2 files changed, 18 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 53b4ddc720..6ce387d378 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2022-07-09 Jim Meyering <meyering@fb.com>
+
+ announce-gen: better diagnose some usage errors
+ * build-aux/announce-gen (main): Erroneous usage would elicit a
+ misleading diagnostic. When --gnulib-version=V was specified:
+ - without --bootstrap_tools, or
+ - with --bootstrap_tools, but without listing "gnulib" as a tool
+ we would give an inappropriate diagnostic. Now, each diagnostic
+ is tailored to the precise erroneous condition.
+ Reported by Bruno Haible in
+ https://lists.gnu.org/r/bug-gnulib/2022-01/msg00025.html
+
2022-07-09 Simon Josefsson <simon@josefsson.org>
git-version-gen: Doc fix.
diff --git a/build-aux/announce-gen b/build-aux/announce-gen
index 3557fabf4b..320cf4b0d6 100755
--- a/build-aux/announce-gen
+++ b/build-aux/announce-gen
@@ -35,7 +35,7 @@
eval 'exec perl -wSx "$0" "$@"'
if 0;
-my $VERSION = '2022-07-08 22:28'; # UTC
+my $VERSION = '2022-07-10 01:47'; # UTC
# The definition above must lie within the first 8 lines in order
# for the Emacs time-stamp write hook (at end) to update it.
# If you change this file with Emacs, please let the write hook
@@ -445,11 +445,15 @@ sub get_tool_versions ($$)
my @tool_list = split ',', $bootstrap_tools
if $bootstrap_tools;
- grep (/^gnulib$/, @tool_list) ^ defined $gnulib_version
+ grep (/^gnulib$/, @tool_list) && ! defined $gnulib_version
and (warn "when specifying gnulib as a tool, you must also specify\n"
. "--gnulib-version=V, where V is the result of running git describe\n"
. "in the gnulib source directory.\n"), $fail = 1;
+ ! grep (/^gnulib$/, @tool_list) && defined $gnulib_version
+ and (warn "with --gnulib-version=V you must use --bootstrap-tools=...\n"
+ . "including gnulib in that list"), $fail = 1;
+
!$release_type || exists $valid_release_types{$release_type}
or (warn "'$release_type': invalid release type\n"), $fail = 1;