<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>25703</bug_id>
          
          <creation_ts>2011-06-01 21:27:26 +0400</creation_ts>
          <short_desc>/etc/bashrc.d/mc.sh should be /etc/profile.d/mc.sh</short_desc>
          <delta_ts>2011-08-23 20:58:25 +0400</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>mc</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="viy">viy</reporter>
          <assigned_to name="Sergey Y. Afonin">asy</assigned_to>
          <cc>asy</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>121826</commentid>
    <comment_count>0</comment_count>
    <who name="viy">viy</who>
    <bug_when>2011-06-01 21:27:26 +0400</bug_when>
    <thetext>обновился до p6 -- в zsh пропал переход на последний посещенный в mc каталог (mc -P). Оказалось, zsh больше не читает /etc/bashrc, 
в /etc/bashrc.d/mc.sh все равно есть проверка на shell, 
поэтому ему место именно в /etc/profile.d/mc.sh:
$ cat /etc/bashrc.d/mc.sh 
# Don&apos;t define aliases in plain Bourne shell
[ -n &quot;${BASH_VERSION}${KSH_VERSION}${ZSH_VERSION}&quot; ] || return 0
alias mc=&apos;. /usr/lib/mc/mc-wrapper.sh&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123780</commentid>
    <comment_count>1</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2011-08-09 02:58:41 +0400</bug_when>
    <thetext>mc-4.7.5.3-alt2 -&gt; sisyphus:

* Tue Aug 09 2011 Sergey Y. Afonin &lt;asy@altlinux&gt; 4.7.5.3-alt2
- moved mc.sh from bashrc.d to profile.d (ALT #25703)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123781</commentid>
    <comment_count>2</comment_count>
    <who name="viy">viy</who>
    <bug_when>2011-08-09 03:09:02 +0400</bug_when>
    <thetext>thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>124387</commentid>
    <comment_count>3</comment_count>
    <who name="Sergey Y. Afonin">asy</who>
    <bug_when>2011-08-23 14:36:38 +0400</bug_when>
    <thetext>Похоже, это поломало алиас для bash, который запускается из Konsole. Он не читает /etc/profile в этом случае. mc.sh надо возвращать в /etc/bashrc.d/. Вопрос, что делать тогда с zsh ? Держать две копии mc.sh ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>124391</commentid>
    <comment_count>4</comment_count>
    <who name="viy">viy</who>
    <bug_when>2011-08-23 16:01:02 +0400</bug_when>
    <thetext>запустил в konsole bash -v, чтобы посмотреть, чего он там грузит:
он грузит ~/.bashrc в котором (из /etc/skel) есть
# Source global definitions
if [ -r /etc/bashrc ]; then
        . /etc/bashrc
fi
загрузка /etc/bashrc
# /etc/bashrc: executed by ~/.bashrc for non-login shells.
в /etc/profile он уже не лезет.

с другой стороны, zsh -&gt; /etc/zshrc теперь не берет /etc/bashrc
а только /etc/profile.

получается да, надо 2 файла.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>124396</commentid>
    <comment_count>5</comment_count>
    <who name="Sergey Y. Afonin">asy</who>
    <bug_when>2011-08-23 17:02:00 +0400</bug_when>
    <thetext>Кстати, zsh читает только *.sh ? Если обозвать mc.zsh, увидит ?

Вот в таком виде положу:

# define aliases for zsh
[ -n &quot;${ZSH_VERSION}&quot; ] || return 0
alias mc=&apos;. /usr/lib/mc/mc-wrapper.sh&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>124401</commentid>
    <comment_count>6</comment_count>
    <who name="viy">viy</who>
    <bug_when>2011-08-23 19:55:22 +0400</bug_when>
    <thetext>(В ответ на комментарий №5)
&gt; Кстати, zsh читает только *.sh ? Если обозвать mc.zsh, увидит ?

zsh сорсит (.) /etc/profile.
это уже внутири /etc/profile сорсятся *.sh.
посмотрите у себя /etc/zshrc и /etc/profile,
все вопросы отпадут сами собой.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>124402</commentid>
    <comment_count>7</comment_count>
    <who name="viy">viy</who>
    <bug_when>2011-08-23 19:56:33 +0400</bug_when>
    <thetext>(В ответ на комментарий №5)
&gt; Вот в таком виде положу:
&gt; # define aliases for zsh
&gt; [ -n &quot;${ZSH_VERSION}&quot; ] || return 0
&gt; alias mc=&apos;. /usr/lib/mc/mc-wrapper.sh&apos;

Спасибо, будет работать.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>124403</commentid>
    <comment_count>8</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2011-08-23 20:58:25 +0400</bug_when>
    <thetext>mc-4.7.5.3-alt3 -&gt; sisyphus:

* Tue Aug 23 2011 Sergey Y. Afonin &lt;asy@altlinux&gt; 4.7.5.3-alt3
- moved mc.sh back to bashrc.d (ALT #25703/c#3)
- added alias definition for zsh in profile.d (ALT #25703)
- rollback fix for Ticket #81 (new problem described in Ticket #2594)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>