Greg Schafer wrote:
Matthew Burgess wrote:
I still haven't a clue what caused me to obtain the original error
message, but I can't seem to reproduce it now :( That would seem to
hint at a race condition like Bryan originally alluded to.
The usual cause of this specific error is because shell hashing is not
switched off. ie: using `mv' to move itself and the shell remembers the
original location.
Well, I'm using jhalfs. jhalfs' `chroot' command uses '+h' to turn off
hashing. Each package is then installed using its own script, with a
typical #!/bin/bash shebang line. Tests here suggest that options do
not get inherited by subshells:
sudo chroot "$LFS" /usr/bin/env -i HOME=/root TERM="$TERM" PS1='\u:\w\$'
PATH=/bin:/usr/bin:/sbin:/usr/sbin /bin/bash --login +h
root:/# set | grep SHELLOPTS
SHELLOPTS=braceexpand:emacs:histexpand:history:interactive-comments:monitor
root:/# /bin/bash
root:/# set | grep SHELLOPTS
SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor
Note how 'hashall' (equivalent to '-h') is now set!
Thanks Greg, this seems to explain what was going on with that error
message I saw. Any ideas on what the best method of fixing this is?
Perhaps just adding a 'set +h' in each script that jhalfs outputs?
Regards,
Matt.
--
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page