Bug 2063018

Summary: sourcing which2.sh from a ksh causes error
Product: Red Hat Enterprise Linux 8 Reporter: Daniel Reynolds <dareynol>
Component: whichAssignee: Than Ngo <than>
Status: CLOSED DUPLICATE QA Contact: CS System Management SST QE <rhel-cs-system-management-subsystem-qe>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.5CC: ddouwsma, patrick.chiang
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Red Hat Enterprise Linux release 8.5 (Ootpa) which-2.21-16.el8.x86_64
Last Closed: 2022-03-28 11:03:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Daniel Reynolds 2022-03-11 06:59:11 UTC
Description of problem:

When sourcing /etc/kshrc from a non interactive ksh shell an error is produced from /etc/profile.d/which2.sh .

This does not occur for which-2.21-12.el8.x86_64 .

Version-Release number of selected component (if applicable): which-2.21-16.el8.x86_64


How reproducible: always


Steps to Reproduce:
1. Create test script test.ksh

    #!/bin/ksh
    . /etc/kshrc

2. Run ./test.ksh

Actual results:

    ./test.ksh
    ./test.ksh[6]: .[17]: .[19]: export: -f: unknown option
    Usage: export [-p] [name[=value]...]

Expected results:

    ./test.ksh

Comment 2 Than Ngo 2022-03-28 11:03:26 UTC
it ist fixed in which-2.21-17

Comment 3 Daniel Reynolds 2022-03-29 02:34:06 UTC
I have tried to upgrade to which-2.21-17.  This package does not appear to be available yet.  Can you confirm when it will be released?

Comment 5 Than Ngo 2022-03-29 07:42:04 UTC

*** This bug has been marked as a duplicate of bug 2009547 ***

Comment 6 Daniel Reynolds 2022-03-30 00:21:14 UTC
Do not believe this is a duplicate of bug 2009547 (https://bugzilla.redhat.com/show_bug.cgi?id=2009547).

Spoke to Donald, he agrees.