From 631a303c88bddf9261c9ea05c5c79fe8d5dae77c Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 17 Jul 2018 14:51:42 +0000 Subject: [PATCH] dummy flight generation: cs-hosts-list should not print { } MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit With newer bash, this causes local envvar="FREEBSD_${arch^^}_BUILDJOB" if [ -n "${!envvar}" ]; then to (properly) report a syntax error. As Roger says, it is better to print a dummy host for each architecture, so do that. Reported-by: Roger Pau Monné Signed-off-by: Ian Jackson --- cs-hosts-list | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/cs-hosts-list b/cs-hosts-list index 6b910ae..384ed46 100755 --- a/cs-hosts-list +++ b/cs-hosts-list @@ -92,15 +92,18 @@ my ($flags) = @ARGV; my $o; if ($ENV{'OSSTEST_HOSTSLIST_DUMMY'}) { - $o .= "SOMEHOST"; - if (@arches) { - $o .= " $kernels[0]"; - $o .= " {".join(',',@arches)."}"; + foreach my $arch (@arches ? @arches : qw(SOMEARCH)) { + $o .= "SOMEHOST"; + $o .= "-\U$arch" if @arches; + if (@arches) { + $o .= " $kernels[0]"; + $o .= " $arch"; + } + if (@suites) { + $o .= " $suites[0]"; + } + $o .= "\n"; } - if (@suites) { - $o .= " $suites[0]"; - } - $o .= "\n"; print $o or die $!; exit 0; } -- 2.39.5