On Tue, Aug 18, 2015 at 06:07:57AM -0400, Stephen Powell wrote:
> The sysconfig-hardware package contains a number of syntax errors in "case"
> commands.  The "case" command requires that after each pattern specification
> there must be a command list, and this command list must be terminated by
> a double semicolon. 

This is incorrect if you look at POSIX:

  The compound-list for each list of patterns, with the possible exception
  of the last, shall be terminated with ";;".

http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html
  "Case Conditional Construct"

> In some places, the only thing between the end of the pattern
> specification and the double semicolon is a comment.  A comment is not
> a list.  A null command (a colon) will do, but there must be at least
> one command present to constitute a list.  In other places, there is
> no double semicolon to terminate the list.  This also is a violation
> of the rules of valid syntax.

Well, all of the scripts declare that they are run with bash. It's
clearer to pass in the : built-in and I couldn't find language lawyering
that would allow the empty compound-list here at first glance, but it's
also highly unlikely that bash will change in a fashion that forbids
this.

To improve correctness it makes sense to apply the patch.

Kind regards
Philipp Kern

Attachment: signature.asc
Description: Digital signature

Reply via email to