All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug] logger 2.26: regression, option -i not combinable with other options
@ 2015-02-20 10:02 Juergen Daubert
  0 siblings, 0 replies; 8+ messages in thread
From: Juergen Daubert @ 2015-02-20 10:02 UTC (permalink / raw)
  To: linux-kernel

Hello,

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].


Posible solution:
- don't combine the -i and --id options but keep the behaviour of -i and
  make --id a long-form only option. 


Thanks and best regards
Juergen


[1] http://roy.marples.name/projects/dhcpcd/artifact/953bd27
[2] http://roy.marples.name/projects/dhcpcd/index

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [bug] logger 2.26: regression, option -i not combinable with other options
@ 2015-02-20 10:06 Juergen Daubert
  2015-02-20 10:41 ` Karel Zak
  2015-03-05 10:21 ` Karel Zak
  0 siblings, 2 replies; 8+ messages in thread
From: Juergen Daubert @ 2015-02-20 10:06 UTC (permalink / raw)
  To: util-linux

Hello,

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].


Posible solution:
- don't combine the -i and --id options but keep the behaviour of -i and
  make --id a long-form only option. 


Thanks and best regards
Juergen


[1] http://roy.marples.name/projects/dhcpcd/artifact/953bd27
[2] http://roy.marples.name/projects/dhcpcd/index


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [bug] logger 2.26: regression, option -i not combinable with other options
  2015-02-20 10:06 Juergen Daubert
@ 2015-02-20 10:41 ` Karel Zak
  2015-02-20 12:44   ` Juergen Daubert
  2015-03-05 10:21 ` Karel Zak
  1 sibling, 1 reply; 8+ messages in thread
From: Karel Zak @ 2015-02-20 10:41 UTC (permalink / raw)
  To: util-linux

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.

Anyway, always use long options in scripts. It's more robust and more
readable.

    Karel


-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [bug] logger 2.26: regression, option -i not combinable with other options
  2015-02-20 10:41 ` Karel Zak
@ 2015-02-20 12:44   ` Juergen Daubert
  2015-02-20 20:12     ` Sami Kerola
  0 siblings, 1 reply; 8+ messages in thread
From: Juergen Daubert @ 2015-02-20 12:44 UTC (permalink / raw)
  To: util-linux

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.
> 
> 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. 


Greetings
Juergen

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [bug] logger 2.26: regression, option -i not combinable with other options
  2015-02-20 12:44   ` Juergen Daubert
@ 2015-02-20 20:12     ` Sami Kerola
  2015-02-21 11:37       ` Benno Schulenberg
  0 siblings, 1 reply; 8+ messages in thread
From: Sami Kerola @ 2015-02-20 20:12 UTC (permalink / raw)
  To: util-linux

On 20 February 2015 at 12:44, Juergen Daubert <jue@jue.li> 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/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [bug] logger 2.26: regression, option -i not combinable with other options
  2015-02-20 20:12     ` Sami Kerola
@ 2015-02-21 11:37       ` Benno Schulenberg
  2015-02-21 15:28         ` Sami Kerola
  0 siblings, 1 reply; 8+ messages in thread
From: Benno Schulenberg @ 2015-02-21 11:37 UTC (permalink / raw)
  To: kerolasa; +Cc: util-linux


On Fri, Feb 20, 2015, at 21:12, Sami Kerola wrote:
> 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

The fix looks fine, of course.  Just about the commit message:

s/loggerit's/logger it's/
s/options such as:/options, such as -s.  But currently:/

Also, to make the fix complete the -i and -id options have
to be separated in the usage text and the man page.

Benno

-- 
http://www.fastmail.com - Does exactly what it says on the tin


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [bug] logger 2.26: regression, option -i not combinable with other options
  2015-02-21 11:37       ` Benno Schulenberg
@ 2015-02-21 15:28         ` Sami Kerola
  0 siblings, 0 replies; 8+ messages in thread
From: Sami Kerola @ 2015-02-21 15:28 UTC (permalink / raw)
  To: Benno Schulenberg; +Cc: util-linux

On 21 February 2015 at 11:37, Benno Schulenberg <bensberg@justemail.net> wrote:
> On Fri, Feb 20, 2015, at 21:12, Sami Kerola wrote:
>> 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
>
> The fix looks fine, of course.  Just about the commit message:
>
> s/loggerit's/logger it's/
> s/options such as:/options, such as -s.  But currently:/
>
> Also, to make the fix complete the -i and -id options have
> to be separated in the usage text and the man page.

Cheers Benno,

Improvements you mentioned are included in

https://github.com/kerolasa/lelux-utiliteetit/commit/87a34e69ff79ef5c2b81cee33902885e2255ac39

-- 
Sami Kerola
http://www.iki.fi/kerolasa/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [bug] logger 2.26: regression, option -i not combinable with other options
  2015-02-20 10:06 Juergen Daubert
  2015-02-20 10:41 ` Karel Zak
@ 2015-03-05 10:21 ` Karel Zak
  1 sibling, 0 replies; 8+ messages in thread
From: Karel Zak @ 2015-03-05 10:21 UTC (permalink / raw)
  To: util-linux

On Fri, Feb 20, 2015 at 11:06:47AM +0100, Juergen Daubert wrote:
> Hello,
> 
> 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].

 Fixed in git tree, the bugfix will be in v2.26.1 (probably last week
 this month or early).

    Karel


-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-03-05 10:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-20 10:02 [bug] logger 2.26: regression, option -i not combinable with other options Juergen Daubert
  -- strict thread matches above, loose matches on Subject: below --
2015-02-20 10:06 Juergen Daubert
2015-02-20 10:41 ` Karel Zak
2015-02-20 12:44   ` Juergen Daubert
2015-02-20 20:12     ` Sami Kerola
2015-02-21 11:37       ` Benno Schulenberg
2015-02-21 15:28         ` Sami Kerola
2015-03-05 10:21 ` Karel Zak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.