Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1732607

Summary: tcsh -e fails if prelink is not installed
Product: Red Hat Enterprise Linux 7 Reporter: Paulo Andrade <pandrade>
Component: kde-settingsAssignee: Jan Grulich <jgrulich>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.6CC: bsanford, hakan.stensby, jason.dunn, mboisver, tpelka
Target Milestone: rc   
Target Release: 7.9   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kde-settings-19-23.11.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-29 19:26:06 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 Paulo Andrade 2019-07-23 21:05:49 UTC
Example:

$ echo '$foo' | tcsh -e
<< empty >>

  If using this pseudo patch to /etc/profile.d/kde.csh:

-if ( ! $?KDE_IS_PRELINKED ) then
+if ( ! $?KDE_IS_PRELINKED && -f /etc/sysconfig/prelink ) then

then it works.

  The issue happens in Fedora and other RHEL releases, as long
as kde-settings is installed and prelink is not installed.

Comment 2 Paulo Andrade 2019-07-30 13:51:53 UTC
  This turned out to be more complicated situation.
  Even if prelink is installed, but disabled, as is the case of
the user, because the grep command exits with a non zero status,
tcsh -e would still fail.
  One construct for a /etc/sysconfig/prelink with PRELINKING=no
to work with 'tcsh -e' would be:

## When/if using prelinking, avoids use of kdeinit
if ( ! $?KDE_IS_PRELINKED && -f /etc/sysconfig/prelink ) then
  set prelink=`grep 'PRELINKING=' /etc/sysconfig/prelink | sed -e 's/.*=//'`
  if ( X$prelink == Xyes ) then
    setenv KDE_IS_PRELINKED 1
  endif
endif

  User is aware that prelink is not supported/recommended in rhel7, but
right now cannot remove the package.

Comment 3 Paulo Andrade 2019-08-26 11:20:54 UTC
  A patch must be added even is prelink is not installed, because
if the environment variable KDE_IS_PRELINKED is not set, it will
blindly attempt to read /etc/sysconfig/prelink and cause 'tcsh -e'
to silently fail, because of the error on the startup script.

Comment 4 HÃ¥kan Stensby 2019-12-11 12:05:16 UTC
Hi,

When is the patch ready for this problem?

Comment 12 Bill Sanford 2020-05-18 18:02:18 UTC
With or without prelink installed the command returns the same output.

[root@hp-z200-tpb-c-02 ~]# echo '$foo' | tcsh -e
foo: Undefined variable.

Comment 13 Paulo Andrade 2020-05-25 13:11:34 UTC
Thanks for the test. The reproducer is somewhat bogus.

The proper test could be done using both, double and single quotes.

With double quotes, $foo usually will expand to an empty string before tcsh
invocation, what will just check tcsh initialization files.

With single quotes the error should be expected, and just show tcsh -e
error checking passed all initialization scripts, and got the error on
a undefined variable.

Comment 14 Jason Dunn 2020-09-16 19:18:06 UTC
I'd like to also say that I am seeing this issue.  Prelink is installed but disabled, and the /etc/profile.d/kde.csh prevents my user from running 'tcsh -e'.  Can we please have a fix/patch for this?

Thanks,
Jason

Comment 16 errata-xmlrpc 2020-09-29 19:26:06 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (fltk bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:3872