Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 176994 - app-shells/zsh - etc/zsh/zprofile error when globbing empty and/or non-existant /etc/profile.d
Summary: app-shells/zsh - etc/zsh/zprofile error when globbing empty and/or non-exista...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Mamoru KOMACHI (RETIRED)
URL:
Whiteboard:
Keywords:
: 177865 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-05-04 06:40 UTC by JT
Modified: 2007-05-10 05:49 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description JT 2007-05-04 06:40:56 UTC
Sourcing /etc/zsh/zprofile throws error when /etc/profile.d is empty and/or doesn't exist. 

Last login: Thu May  3 23:29:45 2007 from 10.10.1.4
/etc/zsh/zprofile:34: no matches found: /etc/profile.d/*.sh


Reproducible: Always




Possible fix: set/unset nullglob... or something... anything. It was ruining my pretty login.

# Extract the value of EDITOR
[ -z "$EDITOR" ] && EDITOR="`. /etc/rc.conf 2>/dev/null; echo $EDITOR`"
[ -z "$EDITOR" ] && EDITOR="/bin/nano"
export EDITOR
setopt nullglob
for sh in /etc/profile.d/*.sh ; do
        if [ -r "$sh" ] ; then
                . "$sh"
        fi
done
unsetopt nullglob
unset sh
Comment 1 JT 2007-05-04 06:43:33 UTC
By the way, /etc/profile.d isn't in the current i686 stage tarball. Should it be?
Comment 2 Dawid Węgliński (RETIRED) gentoo-dev 2007-05-04 07:02:29 UTC
(In reply to comment #0)
> Sourcing /etc/zsh/zprofile throws error when /etc/profile.d is empty and/or
> doesn't exist. 
> 
> Last login: Thu May  3 23:29:45 2007 from 10.10.1.4
> /etc/zsh/zprofile:34: no matches found: /etc/profile.d/*.sh
> 

sapphire cla # mv /etc/profile.d /etc/profile.d.old
sapphire cla # source /etc/zsh/zprofile 
sapphire cla #

Not reproduciable for me. Could you please add info which zsh version are you using?
Comment 3 JT 2007-05-04 07:07:08 UTC
Installed versions:  4.3.2-r2(21:05:45 05/03/07)(-caps -doc -examples -maildir ncurses pcre -static unicode)
Comment 4 David Durrleman 2007-05-07 03:48:23 UTC
bug is reproducible here.

same version:
zsh-4.3.2-r2 (-caps -doc -examples -maildir ncurses pcre -static unicode)
Comment 5 Mamoru KOMACHI (RETIRED) gentoo-dev 2007-05-07 06:54:03 UTC
Thanks for the bug report. I mistakenly assumed /etc/profile.d exist in all Gentoo boxes. Sorry.
I added "setopt nullglob" around the sourcing function of profile.d.
Please remerge zsh to verify it's fixed.
Comment 6 David Durrleman 2007-05-08 01:04:25 UTC
it seems that the fix has created a new bug:

!!! A file listed in the Manifest could not be found: /usr/portage/app-shells/zsh/files/zprofile.bak
Comment 7 JT 2007-05-08 01:19:38 UTC
I've created a report, David.

See Bug #177574
Comment 8 JT 2007-05-08 01:45:38 UTC
Mamoru, while I haven't yet remerged zsh, the updates to zprofile should resolve the issue.

Thanks.
Comment 9 Jakub Moc (RETIRED) gentoo-dev 2007-05-10 05:49:43 UTC
*** Bug 177865 has been marked as a duplicate of this bug. ***