Hello, When running "./build-aux/announce-gen" without any parameters, there are three "use of uninitialized value" warnings: ==== $ ./build-aux/announce-gen announce-gen: release type not specified announce-gen: package name not specified announce-gen: previous version string not specified announce-gen: current version string not specified announce-gen: GnuPG key ID not specified announce-gen: URL directory name(s) not specified announce-gen: Use of uninitialized value $bootstrap_tools in split at ./build-aux/announce-gen line 419. announce-gen: Use of uninitialized value $release_type in exists at ./build-aux/announce-gen line 426. announce-gen: Use of uninitialized value $release_type in concatenation (.) or string at ./build-aux/announce-gen line 426. announce-gen: '': invalid release type Try 'announce-gen --help' for more information. ====
The attached patch avoids them. Regards, -gordon
>From 0c9468d8528a31c936ed1c898bbc64d471e484cd Mon Sep 17 00:00:00 2001 From: "A. Gordon" <assafgor...@gmail.com> Date: Wed, 9 Jul 2014 19:18:40 -0400 Subject: [PATCH] announce-gen: avoid perl warnings * build-aux/announce-gen - add two minor checks to avoid "use of uninitialized value" warnings when command-line parameters are missing. --- build-aux/announce-gen | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build-aux/announce-gen b/build-aux/announce-gen index db9ed50..a3aebf7 100755 --- a/build-aux/announce-gen +++ b/build-aux/announce-gen @@ -416,14 +416,15 @@ sub get_tool_versions ($$) @url_dir_list or (warn "URL directory name(s) not specified\n"), $fail = 1; - my @tool_list = split ',', $bootstrap_tools; + my @tool_list = split ',', $bootstrap_tools + if $bootstrap_tools; 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; - exists $valid_release_types{$release_type} + !$release_type || exists $valid_release_types{$release_type} or (warn "'$release_type': invalid release type\n"), $fail = 1; @ARGV -- 1.9.1