Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 118257 - Bash 3.1 won't read my ~/.bash_profile (-/bin/bash doesnt start a login shell)
Summary: Bash 3.1 won't read my ~/.bash_profile (-/bin/bash doesnt start a login shell)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-08 00:54 UTC by Avuton Olrich
Modified: 2006-01-15 14:25 UTC (History)
0 users

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


Attachments
bash-3.1-fix-dash-login-shell.patch (bash-3.1-fix-dash-login-shell.patch,1.61 KB, patch)
2006-01-15 11:02 UTC, SpanKY
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Avuton Olrich 2006-01-08 00:54:49 UTC
I'm really suprised to find it unreported but since the upgrade to bash-3.1-r2 it doesn't read my ~/.bash_profile now. I couldn't imagine it being a config problem as going back seems to bash-3.0-r14 works fine. Any ideas?

Portage 2.1_pre3-r1 (!/usr/portage/profiles/default-linux/amd64/2005.1, gcc-3.4.5, glibc-2.3.5-r3, 2.6.15 x86_64)
=================================================================
System uname: 2.6.15 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4200+
Gentoo Base System version 1.12.0_pre13
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.3.5, 2.4.2
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-pipe -O2 -march=k8"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-pipe -O2 -march=k8"
DISTDIR="/usr/distfiles"
FEATURES="autoconfig digest distlocks nostrip sandbox sfperms strict userpriv usersandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/mnt/shapeshifter/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 64bit 7zip X a52 aac acpi aim alsa ao audiofile avi bash-completion berkdb bitmap-fonts bzip2 c++ cairo calendar cddb cdparanoia cdr crypt css cups curl dbus debug dvd dvdr eds emacs emacs-w3 encode exif ext-png ext-zlib fam ffmpeg flac foomaticdb fortran freetype ftp gcj gdb gdbm gif gimpprint glut glx gmail gmp gpm grammar gstreamer hal id3 idn image imagemagick imlib imlib2 java javascript joystick jpeg jpeg2k junit kde lame lcms libsamplerate linuxkeys linuxthreads-tls live lzw lzw-tiff mad mikmod mmap mng mod motif mouse mozilla mozsvg mp3 mpeg mpeg2 mpeg4 mplayer ncurses net nfs nntp no-old-linux nptl nptlonly nvidia objc offensive ogg opengl openssh oscar pam pcre pdf pdflib perl png python qt quicktime rar readline real recode rss rtc scp screen sdl session smp sockets speex spell ssl svg svgz symlink sysfs syslog szip t1lib theora threads tiff truetype truetype-fonts type1 type1-fonts udev unicode usb userlocales utf8 vorbis web xine xinerama xml2 xpm xrandr xscreensaver xv xvmc zip zlib elibc_glibc kernel_linux userland_GNU"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 1 SpanKY gentoo-dev 2006-01-08 01:47:47 UTC
do you have a ~/.bash_login ?
Comment 2 Avuton Olrich 2006-01-08 04:24:48 UTC
no... should I?
Comment 3 SpanKY gentoo-dev 2006-01-08 04:32:13 UTC
no, but some people dont realize that .bash_profile and .bash_login are mutal exclusive

bash-3.1 behaves for me at any rate:
$ cd ~
$ mkdir old
$ mv .bash_login .bash_profile old/
$ echo 'echo profile' > .bash_profile
$ bash -l
profile
Comment 4 SpanKY gentoo-dev 2006-01-15 03:49:19 UTC
can you run the sample code i posted and see if it works for you
Comment 5 Avuton Olrich 2006-01-15 05:29:36 UTC
Ok, that bit of code does work, so the problem is a bit different than I'm describing :/. When in gnu screen and I 'C-a C-c' or Create a new window with a shell and switch to that window, .bash_profile is not run like it was in 3.0.
Comment 6 SpanKY gentoo-dev 2006-01-15 11:02:42 UTC
Created attachment 77179 [details, diff]
bash-3.1-fix-dash-login-shell.patch

ah, screen uses '-$SHELL' to start a login shell and there was a thread on bug-bash about this being broken ... can you try this attached patch please ?
Comment 7 Avuton Olrich 2006-01-15 13:48:59 UTC
Yay, That works, thanks!
Comment 8 SpanKY gentoo-dev 2006-01-15 14:25:02 UTC
added to portage then, thanks for testing