accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Havanki (JIRA)" <>
Subject [jira] [Commented] (ACCUMULO-2956) relies on GNU getopt for long opts, which doesn't work in OS X
Date Fri, 27 Jun 2014 16:52:24 GMT


Bill Havanki commented on ACCUMULO-2956:

There are warnings about using getopt(1). From [here|],
via [here|]:

bq. Unless it's the version from util-linux, and you use its advanced mode, never use getopt(1).
Traditional versions of getopt cannot handle empty argument strings, or arguments with embedded
whitespace. The POSIX shell (and others) offer getopts which is safe to use instead.

FWIW you can hack getopts usage to do long options. But, generally, I think for simplicity
we should just lose the long options and use getopts. The isn't documented
anywhere, so isn't very much "public", and the impact is limited to folks who already use
it and are familiar with the command line and so can be told "Oh, use short options from now
on, we're being more portable".

> relies on GNU getopt for long opts, which doesn't work in OS X
> ----------------------------------------------------------------------------------
>                 Key: ACCUMULO-2956
>                 URL:
>             Project: Accumulo
>          Issue Type: Bug
>    Affects Versions: 1.6.0
>            Reporter: Christopher Tubbs
>             Fix For: 1.6.1, 1.7.0
> Discovered while working on ACCUMULO-2646,'s command line options
don't work without GNU getopt. This means that this script doesn't work on OS X or BSD systems
without modification.
> The script should be modified to detect the OS and fall back to a
compatible argument parsing when not in Linux. The long opts should be preserved in Linux,
since these were available in Accumulo 1.6.0.

This message was sent by Atlassian JIRA

View raw message