On Sun, Dec 30, 2007, Jeff Johnson wrote:
> [...]
> - rip --predefine entirely, add comment re macro added both global/CLI.
> [...]
> t = s;
> if (*t == '%') t++;
> -#if 0
> - /* XXX Predefine macro if not initialized yet. */
> - /* rse: this is a very bad hack from the year 2002 which especially results in
> - the value of the first --define option to occur twice on %{@foo} macro stack
> - expansions. We have now disabled it because:
> - 1. it is a very confusing sematic
> - 2. it applies only to the absolutely first occurrence of a --define usage
> - 3. there is already the explicit --predefine in case one really has to
> - define a macro before the config files are loaded. */
> - if (rpmcliInitialized < 0)
> - (void) rpmDefineMacro(NULL, t, RMIL_CMDLINE);
> -#endif
> rpmcliConfigured();
> /*@-type@*/
> [...]
I think you did the wrong change here, Jeff. You now removed just the
hack which has broken --define, but --predefine is still in the code (a
few lines above). For "ripping --predefine entirely" you also have to
remove the remaining POPT_PREDEFINE stuff...
Ralf S. Engelschall
rse@engelschall.com
www.engelschall.com
Received on Mon Dec 31 14:56:19 2007