bootstrap: remove consumed options from the list to be processed.

Fix a bug where processed bootstrap options were not removed
from the queue, and eventually flagged as unknown in the
pluggable option parser driver.
* bootstrap (bootstrap_parse_options)
(bootstrap_validate_options): Follow the pluggable option parser
API correctly, and set func_run_hooks_result to the list of
remaining unconsumed options.
Reported by Roumen Petrov <bugtrack@roumenpetrov.info>

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
This commit is contained in:
Gary V. Vaughan 2011-11-15 13:26:53 +07:00
parent 6beb202613
commit e8db92c345

View File

@ -5,7 +5,7 @@
. `echo "$0" |${SED-sed} 's,[^/]*$,,'`"libltdl/config/extract-trace"
# Set a version string for *this* script.
scriptversion=2011-11-04.05; # UTC
scriptversion=2011-11-15.06; # UTC
# Bootstrap this package from checked-out sources.
# Written by Gary V. Vaughan, 2010
@ -2415,7 +2415,7 @@ bootstrap_parse_options ()
# save modified positional parameters for caller
func_quote_for_eval ${1+"$@"}
func_parse_options_result="$func_quote_for_eval_result"
func_run_hooks_result="$func_quote_for_eval_result"
}
func_add_hook func_parse_options bootstrap_parse_options
@ -2437,7 +2437,7 @@ bootstrap_validate_options ()
# Pass back the list of unconsumed options left.
func_quote_for_eval ${1+"$@"}
func_validate_options_result="$func_quote_for_eval_result"
func_run_hooks_result="$func_quote_for_eval_result"
}