'Apply build.yaml settings from the template.'

def GetConfigFromTemplate(self, template_path):

    with zipfile.ZipFile(template_path) as template_zip:
        build_yaml = None
        for name in template_zip.namelist():
            if name.endswith('build.yaml'):
                build_yaml = name
                break
        if (not build_yaml):
            raise RuntimeError(("Couldn't    find    build.yaml    in    %s" % template_path))
        with template_zip.open(build_yaml) as buildfile:
            repack_config = config.CONFIG.CopyConfig()
            parser = config_lib.YamlParser(fd=buildfile)
            config_data = parser.RawData()
            self.Validate(config_data, template_path)
            repack_config.MergeData(config_data)
    return repack_config
