Re: [bug] logger 2.26: regression, option -i not combinable with other options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 20 February 2015 at 12:44, Juergen Daubert <jue@xxxxxx> wrote:
> On Fri, Feb 20, 2015 at 11:41:06AM +0100, Karel Zak wrote:
>> On Fri, Feb 20, 2015 at 11:06:47AM +0100, Juergen Daubert wrote:
>> > with logger from util-linux 2.25.x it's possible to combine the option
>> > -i with other options like:
>> >
>> >  logger -is
>> >
>> > with 2.26 I get the following error message:
>> >
>> >  $:~> logger -is
>> >  logger: failed to parse id: 's'
>> >
>> > The changed behaviour breaks existing scripts like dhcpcd-run-hooks [1]
>> > from dhcpcd [2].
>>
>> Hmm... stupid regression, next time it would be probably better to
>> introduce optional arguments for long options only.

I agree about both; stupid regression and the --id should not be mixed
with -i option.

>> Anyway, always use long options in scripts. It's more robust and more
>> readable.
>
> here's the response from dhcpcd's author:
>
>  The original BSD sources from which logger is clearly based don't support
>  long options .... and dhcpcd needs to work with them.

Technically speaking assigning short options is against POSIX.

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/logger.html

But removing short options would be so user unfriendly that proposing
such change would lead to immediate tosspot of the year nomination.
Clearly the 'logger -is' should keep on working the same way it always
has. Here's my proposal how regression could be fixed.

https://github.com/kerolasa/lelux-utiliteetit/commit/bfe6c5d2381b510a4a0330c1c809a63e49b26840

-- 
Sami Kerola
http://www.iki.fi/kerolasa/
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux