Bug#526738: gratuitous use of subprocesses

Felix Zielcke fzielcke at z-51.de
Sun May 3 08:19:13 UTC 2009


Am Sonntag, den 03.05.2009, 09:43 +0200 schrieb martin f krafft:

> # sed -n 19,24p /etc/grub.d/00_header
> transform="s,x,x,"
> 
> prefix=/usr
> exec_prefix=${prefix}
> libdir=${exec_prefix}/lib
> grub_prefix=`echo /boot/grub | sed ${transform}`
> 
> 
> What is it doing? That's two subprocesses (shell+sed) used for
> absolutely zero purpose, as far as I can tell.

It's for these configure options

$ ./configure --help
Program names:
  --program-prefix=PREFIX            prepend PREFIX to installed program names
  --program-suffix=SUFFIX            append SUFFIX to installed program names
  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names

It's generated by the AC_ARG_PROGRAM autoconf macro [0]
I don't think it's that useful to remove that feature. Maybe some people
actually want to use it.
I doubt grub2 gets used on old 486 pcs or like that which are so slow that it maybe matters.

[0] http://www.gnu.org/software/autoconf/manual/html_node/Transforming-Names.html#Transforming-Names
-- 
Felix Zielcke






More information about the Pkg-grub-devel mailing list