GNU bug report logs - #29946
no -A argument for 'tr' generates an error message whenever the AIX command "lslpp -L" is used (AIX 6.1 and later).

Previous Next

Package: coreutils;

Reported by: Michael <aixtools <at> felt.demon.nl>

Date: Tue, 2 Jan 2018 17:10:01 UTC

Severity: normal

Tags: fixed

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 29946 in the body.
You can then email your comments to 29946 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#29946; Package coreutils. (Tue, 02 Jan 2018 17:10:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael <aixtools <at> felt.demon.nl>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Tue, 02 Jan 2018 17:10:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Michael <aixtools <at> felt.demon.nl>
To: bug-coreutils <at> gnu.org
Subject: no -A argument for 'tr' generates an error message whenever the AIX
 command "lslpp -L" is used (AIX 6.1 and later).
Date: Tue, 2 Jan 2018 17:32:38 +0100
1). AIX 5.3 (/usr/bin/tr) as an argument (-A) that was not used by the 
command 'lslpp', so the message does not occur:

root <at> x064:[/home/prj/gnu/coreutils-8.29]/usr/bin/tr -A
tr: 0653-712 The combination of options and String parameters is not legal.
Usage: tr [ -[c|C] | -[c|C]ds | -[c|C]s | -ds | -s ] [-A] String1 String2
       tr { -[c|C]d | -[c|C]s | -d | -s } [-A] String1
root <at> x064:[/home/prj/gnu/coreutils-8.29]/opt/bin/tr -A
/opt/bin/tr: invalid option -- 'A'
Try '/opt/bin/tr --help' for more information.
root <at> x064:[/home/prj/gnu/coreutils-8.29]lslpp -L | grep coreutils
  aixtools.gnu.coreutils.man.en_US
                            8.29.0.0    C     F    gnu coreutils man pages
  aixtools.gnu.coreutils.rte
                            8.29.0.0    C     F    gnu coreutils 
02-Jan-2018
  aixtools.gnu.coreutils.share
                            8.29.0.0    C     F    gnu coreutils 
universal files
root <at> x064:[/home/prj/gnu/coreutils-8.29]oslevel -s
5300-07-00-0000

2). AIX 6.1 - at some point - modified it's command "lslpp" to utilize 
"tr -A" - and now, when coreutils are preferred - this generates an 
error message on AIX.

root <at> x072:[/home/prj/gnu/coreutils-8.29]oslevel -s
6100-06-01-1043
root <at> x072:[/home/prj/gnu/coreutils-8.29]/usr/bin/tr -A
tr: 0653-712 The combination of options and String parameters is not legal.
Usage: tr [ -[c|C] | -[c|C]ds | -[c|C]s | -ds | -s ] [-A] String1 String2
       tr { -[c|C]d | -[c|C]s | -d | -s } [-A] String1
root <at> x072:[/home/prj/gnu/coreutils-8.29]/opt/bin/tr -A
/opt/bin/tr: invalid option -- 'A'
Try '/opt/bin/tr --help' for more information.
root <at> x072:[/home/prj/gnu/coreutils-8.29]lslpp -L | grep coreutils
tr: invalid option -- 'A'
Try 'tr --help' for more information.
/usr/sbin/rpm_share[440]: =/usr/bin/awk: This is not an identifier.
  aixtools.gnu.coreutils.man.en_US
                            8.29.0.0    C     F    gnu coreutils man pages
  aixtools.gnu.coreutils.rte
                            8.29.0.0    C     F    gnu coreutils 
02-Jan-2018
  aixtools.gnu.coreutils.share
                            8.29.0.0    C     F    gnu coreutils 
universal files

The following is not REALLY - a solution. But I hope it clarifies the issue.

root <at> x072:[/home/prj/gnu/coreutils-8.29]mv /opt/bin/tr /opt/bin/trXXX
root <at> x072:[/home/prj/gnu/coreutils-8.29]lslpp -L | grep coreutils
  aixtools.gnu.coreutils.man.en_US
                            8.29.0.0    C     F    gnu coreutils man pages
  aixtools.gnu.coreutils.rte
                            8.29.0.0    C     F    gnu coreutils 
02-Jan-2018
  aixtools.gnu.coreutils.share
                            8.29.0.0    C     F    gnu coreutils 
universal files
root <at> x072:[/home/prj/gnu/coreutils-8.29]


Information forwarded to bug-coreutils <at> gnu.org:
bug#29946; Package coreutils. (Tue, 02 Jan 2018 18:57:01 GMT) Full text and rfc822 format available.

Message #8 received at 29946 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Michael <aixtools <at> felt.demon.nl>, 29946 <at> debbugs.gnu.org
Subject: Re: bug#29946: no -A argument for 'tr' generates an error message
 whenever the AIX command "lslpp -L" is used (AIX 6.1 and later).
Date: Tue, 2 Jan 2018 18:56:39 +0000
On 02/01/18 16:32, Michael wrote:
> 1). AIX 5.3 (/usr/bin/tr) as an argument (-A) that was not used by the 
> command 'lslpp', so the message does not occur:
> 
> root <at> x064:[/home/prj/gnu/coreutils-8.29]/usr/bin/tr -A
> tr: 0653-712 The combination of options and String parameters is not legal.

This is non standard.
So I suggest lslpp hardcodes /usr/bin/tr
or better again uses LC_ALL, LC_COLLATE=C etc.
to enforce working in ASCII mode.

cheers,
Pádraig.





Information forwarded to bug-coreutils <at> gnu.org:
bug#29946; Package coreutils. (Tue, 02 Jan 2018 19:41:02 GMT) Full text and rfc822 format available.

Message #11 received at 29946 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Pádraig Brady <P <at> draigBrady.com>,
 Michael <aixtools <at> felt.demon.nl>, 29946 <at> debbugs.gnu.org
Subject: Re: bug#29946: no -A argument for 'tr' generates an error message
 whenever the AIX command "lslpp -L" is used (AIX 6.1 and later).
Date: Tue, 2 Jan 2018 11:40:19 -0800
Pádraig Brady wrote:
> This is non standard.
> So I suggest lslpp hardcodes /usr/bin/tr
> or better again uses LC_ALL, LC_COLLATE=C etc.
> to enforce working in ASCII mode.

lslpp is AIX-specific, so it can assume AIX-specific extensions to tr.

How about if we make 'tr -A' compatible with AIX practice? It would make for one 
less objection to using coreutils on AIX, and it shouldn't be hard to add.




Information forwarded to bug-coreutils <at> gnu.org:
bug#29946; Package coreutils. (Tue, 02 Jan 2018 22:50:02 GMT) Full text and rfc822 format available.

Message #14 received at 29946 <at> debbugs.gnu.org (full text, mbox):

From: Michael <aixtools <at> felt.demon.nl>
To: Paul Eggert <eggert <at> cs.ucla.edu>, Pádraig Brady
 <P <at> draigBrady.com>, 29946 <at> debbugs.gnu.org
Subject: Re: bug#29946: no -A argument for 'tr' generates an error message
 whenever the AIX command "lslpp -L" is used (AIX 6.1 and later).
Date: Tue, 2 Jan 2018 23:11:44 +0100
On 02/01/2018 20:40, Paul Eggert wrote:
> Pádraig Brady wrote:
>> This is non standard.
>> So I suggest lslpp hardcodes /usr/bin/tr
>> or better again uses LC_ALL, LC_COLLATE=C etc.
>> to enforce working in ASCII mode.
>
I am just a messenger.
> lslpp is AIX-specific, so it can assume AIX-specific extensions to tr.
And used frequently. it is the equivalent of rpm -qa (in fact it is 
supposed to call rpm, but that might be failing - the second error 
message - because tr is failing)
>
> How about if we make 'tr -A' compatible with AIX practice? It would 
> make for one less objection to using coreutils on AIX, and it 
> shouldn't be hard to add.
>
That would be ideal :)
>
>
>





Information forwarded to bug-coreutils <at> gnu.org:
bug#29946; Package coreutils. (Wed, 03 Jan 2018 04:17:01 GMT) Full text and rfc822 format available.

Message #17 received at 29946 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Michael <aixtools <at> felt.demon.nl>, Pádraig Brady
 <P <at> draigBrady.com>, 29946 <at> debbugs.gnu.org
Subject: Re: bug#29946: no -A argument for 'tr' generates an error message
 whenever the AIX command "lslpp -L" is used (AIX 6.1 and later).
Date: Tue, 2 Jan 2018 20:16:19 -0800
[Message part 1 (text/plain, inline)]
OK, attached is a proposed patch to coreutils. Michael, can you give it a try?
[0001-tr-add-A-for-compatibility-with-AIX-tr.patch (text/x-patch, attachment)]

Information forwarded to bug-coreutils <at> gnu.org:
bug#29946; Package coreutils. (Wed, 03 Jan 2018 10:11:02 GMT) Full text and rfc822 format available.

Message #20 received at 29946 <at> debbugs.gnu.org (full text, mbox):

From: Michael Felt <aixtools <at> felt.demon.nl>
To: Paul Eggert <eggert <at> cs.ucla.edu>, Pádraig Brady
 <P <at> draigBrady.com>, 29946 <at> debbugs.gnu.org
Subject: Re: bug#29946: no -A argument for 'tr' generates an error message
 whenever the AIX command "lslpp -L" is used (AIX 6.1 and later).
Date: Wed, 3 Jan 2018 11:09:55 +0100

On 1/3/2018 5:16 AM, Paul Eggert wrote:
> OK, attached is a proposed patch to coreutils. Michael, can you give 
> it a try?
Looks good!

After patch:
root <at> x072:[/home/prj/gnu/coreutils-8.29]lslpp -L | grep coreutils
  aixtools.gnu.coreutils.man.en_US
                            8.29.0.0    C     F    gnu coreutils man pages
  aixtools.gnu.coreutils.rte
                            8.29.0.0    C     F    gnu coreutils 
03-Jan-2018
  aixtools.gnu.coreutils.share
                            8.29.0.0    C     F    gnu coreutils 
universal files
root <at> x072:[/home/prj/gnu/coreutils-8.29]






Information forwarded to bug-coreutils <at> gnu.org:
bug#29946; Package coreutils. (Wed, 03 Jan 2018 14:55:01 GMT) Full text and rfc822 format available.

Message #23 received at 29946 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Paul Eggert <eggert <at> cs.ucla.edu>, Michael <aixtools <at> felt.demon.nl>,
 29946 <at> debbugs.gnu.org
Subject: Re: bug#29946: no -A argument for 'tr' generates an error message
 whenever the AIX command "lslpp -L" is used (AIX 6.1 and later).
Date: Wed, 3 Jan 2018 14:54:15 +0000
On 03/01/18 04:16, Paul Eggert wrote:
> +        case 'A':
> +          /* Undocumented option, for compatibility with AIX.  */
> +          setlocale (LC_COLLATE, "C");
> +          setlocale (LC_CTYPE, "C");
> +          break;

I'm ok with this as it's undocumented.

Thanks for doing this.

Pádraig




Information forwarded to bug-coreutils <at> gnu.org:
bug#29946; Package coreutils. (Wed, 03 Jan 2018 19:05:01 GMT) Full text and rfc822 format available.

Message #26 received at 29946 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Michael Felt <aixtools <at> felt.demon.nl>, Pádraig Brady
 <P <at> draigBrady.com>, 29946 <at> debbugs.gnu.org
Subject: Re: bug#29946: no -A argument for 'tr' generates an error message
 whenever the AIX command "lslpp -L" is used (AIX 6.1 and later).
Date: Wed, 3 Jan 2018 11:04:09 -0800
Thanks for checking it; I installed it.




Information forwarded to bug-coreutils <at> gnu.org:
bug#29946; Package coreutils. (Tue, 30 Oct 2018 02:31:01 GMT) Full text and rfc822 format available.

Message #29 received at 29946 <at> debbugs.gnu.org (full text, mbox):

From: Assaf Gordon <assafgordon <at> gmail.com>
To: 29946 <at> debbugs.gnu.org
Subject: Re: bug#29946: no -A argument for 'tr' generates an error message
 whenever the AIX command "lslpp -L" is used (AIX 6.1 and later).
Date: Mon, 29 Oct 2018 20:29:52 -0600
tags 29946 fixed
close 29946
stop

(triaging old bugs)

Pushed here:
https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=3f9b1b86b18777b996c81d40c64e1e3ede8ecbef

so closing as "fixed".

-assaf





Added tag(s) fixed. Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 30 Oct 2018 02:31:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 29946 <at> debbugs.gnu.org and Michael <aixtools <at> felt.demon.nl> Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 30 Oct 2018 02:31:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 27 Nov 2018 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 144 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.