[arch-releng] [PATCH] Define grubmenu as a global variable instead of multiple local variables

Dieter Plaetinck dieter at plaetinck.be
Sat Jan 8 05:56:54 EST 2011

On Tue, 04 Jan 2011 18:28:35 -0500
Matthew Gyurgyik <pyther at pyther.net> wrote:

> On 01/03/2011 10:30 PM, Matthew Gyurgyik wrote:
> > On 01/03/2011 01:30 PM, Dieter Plaetinck wrote:
> >> merged from your github.
> >> thanks,
> >> Dieter
> > This needs to be reverted or the sourcing order needs to be
> > changed....
> >
> > What happens is that when lib-ui-interactive.sh is sourced 
> > $var_TARGET_DIR is not yet set, resulting in 
> > grubmenu="$var_TARGET_DIR/boot/grub/menu.lst" equaling 
> > /boot/grub/menu.lst instead of /mnt/boot/grub/menu.lst
> >
> > I attempted to figure out the sourcing order, however I failed. 
> > var_TARGET_DIR is set in core/procedures/base. Maybe this can be 
> > sourced before lib-ui-interactive?
> >
> > In my brief (non-rebooted) install test /boot/grub/menu.lst (on the 
> > live cd) was being edited instead of the one on the target system 
> > Since I didn't reboot I didn't realize this until I was working on
> > my Syslinux code.
> >
> > pyther
> @dieter if you don't have the time to investigate this can you revert 
> this change?

sorry my pc has been broken all week.
i understand the issue. the key is src/aif.sh, the `load_module core`
call (which loads all core (i.e. default) libraries), which is followed
by the `load_procedure "$module" "$procedure"` call, which usually means
`load_procedure core interactive`

note that the interactive procedure has a statement `depend_procedure
core base` which causes base to be sourced very early when interactive
is sourced, however this is after loading the libraries.

We might be able to load procedures first, libraries after, but that
might cause similar sourcing order problems.  I need to think about
this a bit more and get an idea of the dependencies between procedures
and libraries.
do you have any suggestions?


More information about the arch-releng mailing list