[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 2/2] tools: Clear private variables from configure --with-opt



On Wed, 2014-10-22 at 14:06 +0100, Ian Jackson wrote:
> Olaf Hering writes ("[PATCH 2/2] tools: Clear private variables from 
> configure --with-opt"):
> > Configure will use variables from environment when substituting a
> > private variable if the corresponding --with*-foo option is omited.
> > This happens for seabios_path, ovmf_path and EXTRA_QEMUU_CONFIGURE_ARGS:
> > 
> > git clean -dfx
> > env EXTRA_QEMUU_CONFIGURE_ARGS=XXXXXXXXXXXXXXXX ./configure
> > grep XXXXXXXXXXXXXXXX config/Tools.mk
> > CONFIG_QEMUU_EXTRA_ARGS:= XXXXXXXXXXXXXXXX
> > 
> > The reason is the empty "action-if-not-given" case. Fix the bug by
> > clearing the variables in this case.
> 
> Why on earth is this a problem ?  My answer is `don't do that then'.

Is the patch harmful though? Do you think people are relying on this
behaviour?

The autoconf docs for AC_ARG_WITH don't really say what the default is
if you omit one of the option shell scripts, presumably it is to do
nothing.

https://autotools.io/autoconf/arguments.html talks about AC_ARG_VAR
which is supposed to be used for this sort of thing.

I've not confirmed this but
http://stackoverflow.com/questions/13848154/passing-environment-variables-to-autoconfs-configure
 suggests that passing something via the env causes config.status --recheck to 
do the wrong thing, which seems very plausible.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.