[MacPorts] #40603: MacPorts bash doesn't work properly as a default shell (should define SH_SOURCE_BASHRC)

MacPorts noreply at macports.org
Sat Sep 28 03:24:15 PDT 2013


#40603: MacPorts bash doesn't work properly as a default shell (should define
SH_SOURCE_BASHRC)
----------------------+----------------------
  Reporter:  dlitz@…  |      Owner:  raimue@…
      Type:  defect   |     Status:  assigned
  Priority:  Normal   |  Milestone:
 Component:  ports    |    Version:  2.2.0
Resolution:           |   Keywords:
      Port:  bash     |
----------------------+----------------------
Changes (by raimue@…):

 * status:  new => assigned


Comment:

 Thank you for the very detailed report and the steps to reproduce the
 issue. You are indeed correct that the version of bash distributed by
 Apple has `SSH_SOURCE_BASHRC` enabled. There seem to be some twists with
 enabling this. The bash upstream maintainer actually advises against it
 (that's why it isn't enabled by default). I am in the process of checking
 which other distributions enable this as well, but it seems like almost
 every Linux distribution does it.

 The usual workaround for the different startup files for interactive and
 login shells would be to to source `.bashrc` from your `.bash_profile`.
 That is what I am using and thus never noticed a problem. However, if you
 do this, make sure you do not make any output on stdout as it would break
 non-interactive protocol connections over SSH (e.g. scp or rsync).

 {{{
 # Source .bashrc if it exists
 if [ -r ~/.bashrc ]; then
     source ~/.bashrc
 fi
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/40603#comment:2>
MacPorts <http://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list