Bug 1164313 - incorrect comment in default zshenv configuration file [Fedora]
Summary: incorrect comment in default zshenv configuration file [Fedora]
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: zsh
Version: 20
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Kamil Dudka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1164312
TreeView+ depends on / blocked
 
Reported: 2014-11-14 16:07 UTC by Kamil Dudka
Modified: 2014-12-06 10:36 UTC (History)
3 users (show)

Fixed In Version: zsh-5.0.7-4.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of: 1164312
Environment:
Last Closed: 2014-12-01 18:58:56 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Kamil Dudka 2014-11-14 16:07:04 UTC
+++ This bug was initially created as a clone of Bug #1164312 +++

+++ This bug was initially created as a clone of Bug #1103697 +++

Description of problem:

Misleading comment in the /etc/zshenv file provided by zsh package. Specifically, it states that executing zsh with -f will cause the file to not be sourced, which is incorrect. The man page correctly notes that zshenv is always parsed.

The file is always sourced, and hence if you want to avoid having a particular section take effect with -f, you need to encapsulate it with an if statement.

Here is some output to demonstrate that /etc/zshenv is always sourced, even if zsh is launched with -f:

[root@localhost]/# rpm -q zsh
zsh-4.3.10-4.1.el6.x86_64

[root@localhost]/# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.2 (Santiago)

[root@localhost]/# cat /etc/zshenv
#
# /etc/zshenv is sourced on all invocations of the
# shell, unless the -f option is set.  It should
# contain commands to set the command search path,
# plus other important environment variables.
# .zshenv should not contain commands that produce
# output or assume the shell is attached to a tty.
#

[root@localhost]/# echo $EVBTEST

[root@localhost]/# echo 'EVBTEST=yep' >> /etc/zshenv
[root@localhost]/# zsh -f
[root@localhost]# echo $EVBTEST
yep


Version-Release number of selected component (if applicable):
zsh-4.3.10-4.1.el6.x86_64

How reproducible:
Everytime

Steps to Reproduce:

[root@localhost]/# echo $EVBTEST

[root@localhost]/# echo 'EVBTEST=yep' >> /etc/zshenv
[root@localhost]/# zsh -f
[root@localhost]# echo $EVBTEST
yep

Actual results:
The configuration file misinterprets it. 

Expected results:
The configuration file should provide the correct information.

Additional info:

--- Additional comment from Kamil Dudka on 2014-11-14 17:02:11 CET ---

This is a bug inherited from Fedora, where it still exists even in rawhide.

I proposed to replace the comment by the one that Ubuntu distributes:

# /etc/zsh/zshenv: system-wide .zshenv file for zsh(1).
#
# This file is sourced on all invocations of the shell.
# If the -f flag is present or if the NO_RCS option is
# set within this file, all other initialization files
# are skipped.
#
# This file should contain commands to set the command
# search path, plus other important environment variables.
# This file should not contain commands that produce
# output or assume the shell is attached to a tty.
#
# Global Order: zshenv, zprofile, zshrc, zlogin

Comment 1 Kamil Dudka 2014-11-18 13:23:39 UTC
fixed in zsh-5.0.7-3.fc22

Comment 2 Fedora Update System 2014-11-19 19:01:56 UTC
zsh-5.0.7-4.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/zsh-5.0.7-4.fc21

Comment 3 Fedora Update System 2014-11-19 19:02:05 UTC
zsh-5.0.7-4.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/zsh-5.0.7-4.fc20

Comment 4 Fedora Update System 2014-11-20 09:06:58 UTC
Package zsh-5.0.7-4.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing zsh-5.0.7-4.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-15446/zsh-5.0.7-4.fc21
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2014-12-01 18:58:56 UTC
zsh-5.0.7-4.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2014-12-06 10:36:32 UTC
zsh-5.0.7-4.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.