user's 'bin' PATH isn't exported

Bug #290918 reported by norberto
2
Affects Status Importance Assigned to Milestone
bash (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: bash

$HOME .profile file is intented for user specific settings of the bash interpreter, but a new login after the user create a named 'bin' folder inside her $HOME will be not exported on $PATH because 'export' clause was missing.

--- .profile.orig 2008-10-29 19:27:40.000000000 -0200
+++ .profile 2008-10-29 19:45:51.000000000 -0200
@@ -18,7 +18,7 @@

 # set PATH so it includes user's private bin if it exists
 if [ -d "$HOME/bin" ] ; then
- PATH="$HOME/bin:$PATH"
+ export PATH="$HOME/bin:$PATH"
 fi

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 8.10
ExecutablePath: /usr/bin/yelp
Package: yelp 2.24.0-0ubuntu2
ProcEnviron:
 PATH=/home/username/src/wireshark-1.0.3-asterix:/lpgs/hlproducts/netcdf/3.5.1/bin:/lpgs/hlproducts/gmt/4.0/bin:/home/username/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=es_AR.UTF-8
 SHELL=/bin/bash
SourcePackage: yelp
Uname: Linux 2.6.27-7-generic i686

Tags: apport-bug
Revision history for this message
norberto (netcaster) wrote :
Revision history for this message
Matthias Klose (doko) wrote :

no, PATH already is exported

Changed in bash:
status: New → Invalid
Revision history for this message
norberto (netcaster) wrote :

Matthias, PATH already is exported BUT without $HOME/bin path. You are wrong and the issue is a bug.

Changed in bash:
status: Invalid → New
Revision history for this message
Matthias Klose (doko) wrote :

No. changing the value doesn't change the export status

Changed in bash:
status: New → Invalid
Revision history for this message
norberto (netcaster) wrote :

Matthias, I don't know if you don't understand or you don't want understand.

Again, as I say above, if you create a bin folder inside your $HOME and then make a new session, the folder is not appended to the PATH as is trying the .profile script, but if you add export clause at .profile as in the above patch, the folder is appended. Can you say me what is the part that you can't understand?

That's all for me. Bye Matthias.

Changed in bash:
status: Invalid → New
Matthias Klose (doko)
Changed in bash:
status: New → Invalid
norberto (netcaster)
Changed in bash:
status: Invalid → New
Matthias Klose (doko)
Changed in bash:
status: New → Invalid
norberto (netcaster)
Changed in bash:
status: Invalid → New
Revision history for this message
Matthias Klose (doko) wrote :

Please stop converting back this report back from a question.

Changed in bash:
status: New → Invalid
Revision history for this message
norberto (netcaster) wrote :

It's a bug do the following code of the .profile script not sets $HOME/bin to the user env.

# set PATH so it includes user's private bin if it exists
if [ -d ~/bin ] ; then
    PATH=~/bin:"${PATH}"
fi

OR because the above code must be removed from .profile because it's not working as expected.

Changed in bash:
status: Invalid → New
Revision history for this message
norberto (netcaster) wrote :

Matthias Klose, please stop converting this report to a question.

Revision history for this message
Colin Watson (cjwatson) wrote :

"Matthias, PATH already is exported BUT without $HOME/bin path. You are wrong and the issue is a bug."

You say that PATH is already exported before that bit of .profile. If PATH is already exported, then changing its value does not require it to be exported again. Demonstration:

  $ export FOO=bar
  $ sh -c 'echo "$FOO"'
  bar
  $ FOO=foo
  $ sh -c 'echo "$FOO"'
  foo

Revision history for this message
norberto (netcaster) wrote :

Colin that's true.

Reviewing again in our servers the .profile file, about 50 lines down of default .profile, somebody of us export PATH again and thas make the big mistake looking that as a bug.

Matthias Klose you are true.
SORRY SO MUCH

Changed in bash:
status: New → Invalid
Revision history for this message
Matthias Klose (doko) wrote :

np

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.