def self.load(conffile, user_options = Options.nil)
case conffile
when Hash
config = conffile
else
data = YAML.load(conffile)
config = Interpolator.interpolate(data)
end
check_backward_compatibility(config)
config = config.keys_to_sym
if !config[:autobuild]
raise ConfigException, "no toplevel autobuild config block"
end
autobuild_config = config[:autobuild]
default_options = Options.default
user_options.each_pair { |sym, value|
if !value.nil?
autobuild_config[sym] = value
elsif !autobuild_config.has_key?(sym)
autobuild_config[sym] = default_options.send(sym)
end
}
$verbose = $VERBOSE = autobuild_config[:verbose]
$trace = $DEBUG = autobuild_config[:debug]
get_autobuild_config(config)
get_package_config(config)
end