<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>176994</bug_id>
          
          <creation_ts>2007-05-04 06:40 0000</creation_ts>
          <short_desc>app-shells/zsh - etc/zsh/zprofile error when globbing empty and/or non-existant /etc/profile.d</short_desc>
          <delta_ts>2007-05-10 05:49:43 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Applications</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>trivial</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>6d79676d61696c@gmail.com</reporter>
          <assigned_to>usata@gentoo.org</assigned_to>
          <cc>cla@gentoo.org</cc>
    
    <cc>dualmoo@gmail.com</cc>
    
    <cc>thorsten@thorstenkampe.de</cc>

      

      
          <long_desc isprivate="0">
            <who>6d79676d61696c@gmail.com</who>
            <bug_when>2007-05-04 06:40:56 0000</bug_when>
            <thetext>Sourcing /etc/zsh/zprofile throws error when /etc/profile.d is empty and/or doesn&apos;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 &quot;$EDITOR&quot; ] &amp;&amp; EDITOR=&quot;`. /etc/rc.conf 2&gt;/dev/null; echo $EDITOR`&quot;
[ -z &quot;$EDITOR&quot; ] &amp;&amp; EDITOR=&quot;/bin/nano&quot;
export EDITOR
setopt nullglob
for sh in /etc/profile.d/*.sh ; do
        if [ -r &quot;$sh&quot; ] ; then
                . &quot;$sh&quot;
        fi
done
unsetopt nullglob
unset sh</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>6d79676d61696c@gmail.com</who>
            <bug_when>2007-05-04 06:43:33 0000</bug_when>
            <thetext>By the way, /etc/profile.d isn&apos;t in the current i686 stage tarball. Should it be?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>cla@gentoo.org</who>
            <bug_when>2007-05-04 07:02:29 0000</bug_when>
            <thetext>(In reply to comment #0)
&gt; Sourcing /etc/zsh/zprofile throws error when /etc/profile.d is empty and/or
&gt; doesn&apos;t exist. 
&gt; 
&gt; Last login: Thu May  3 23:29:45 2007 from 10.10.1.4
&gt; /etc/zsh/zprofile:34: no matches found: /etc/profile.d/*.sh
&gt; 

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?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>6d79676d61696c@gmail.com</who>
            <bug_when>2007-05-04 07:07:08 0000</bug_when>
            <thetext>Installed versions:  4.3.2-r2(21:05:45 05/03/07)(-caps -doc -examples -maildir ncurses pcre -static unicode)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dualmoo@gmail.com</who>
            <bug_when>2007-05-07 03:48:23 0000</bug_when>
            <thetext>bug is reproducible here.

same version:
zsh-4.3.2-r2 (-caps -doc -examples -maildir ncurses pcre -static unicode)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>usata@gentoo.org</who>
            <bug_when>2007-05-07 06:54:03 0000</bug_when>
            <thetext>Thanks for the bug report. I mistakenly assumed /etc/profile.d exist in all Gentoo boxes. Sorry.
I added &quot;setopt nullglob&quot; around the sourcing function of profile.d.
Please remerge zsh to verify it&apos;s fixed.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dualmoo@gmail.com</who>
            <bug_when>2007-05-08 01:04:25 0000</bug_when>
            <thetext>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</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>6d79676d61696c@gmail.com</who>
            <bug_when>2007-05-08 01:19:38 0000</bug_when>
            <thetext>I&apos;ve created a report, David.

See Bug #177574</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>6d79676d61696c@gmail.com</who>
            <bug_when>2007-05-08 01:45:38 0000</bug_when>
            <thetext>Mamoru, while I haven&apos;t yet remerged zsh, the updates to zprofile should resolve the issue.

Thanks.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2007-05-10 05:49:43 0000</bug_when>
            <thetext>*** Bug 177865 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
      
    </bug>

</bugzilla>