r7859 - in trunk/BOOK: . chapter01 chapter06

Dan Nicholson dbn.lists at gmail.com
Mon Nov 27 07:02:38 PST 2006


On 11/26/06, Alexander E. Patrakov <patrakov at ums.usu.ru> wrote:
> Dan Nicholson wrote:
> >
> > Either add "set +h" to each script, or add +h to the shebang line. Or
> > invoke each script with "bash +h ...". Or, just source the script with
> > hashall turned off in the current environment. I don't have the jhalfs
> > source in front of me right now to dig through.

> jhalfs writes Makefiles that were modeled after an old version of LiveCD
> Makefiles and then developed independently. Both the old and the current
> LiveCD Makefiles have a bug that they mimic the bash setup in the book
> precisely, even if this doesn't apply to non-interactive shells the
> "make" tool (that runs each bash line in a separate shell). Probably
> this bug has just manifested itself in jhalfs.
>
> I will look more into this in a week, when I return from the conference.

CC'ing alfs-discuss. George, Manuel: It seems that the individual
package scripts aren't maintaining the shell options used by the
parent shell. In this case, since "set +h" isn't being inherited by
the coreutils build, mv is trying to move itself because the shell
hashing remembers the location of the old mv. Or something like that.
But you can easily test with the variable SHELLOPTS or $- that nested
shells won't inherit +h. The scripts need to contain "set +h" or be
invoked differently.

Here's the start of the thread:

http://linuxfromscratch.org/pipermail/lfs-book/2006-November/020045.html

--
Dan



More information about the alfs-discuss mailing list