Example #1
0
    def get_flatpak_source_info(self) -> FlatpakSourceInfo:
        flatpak_yaml = self.source_config.flatpak
        compose_info = self.get_flatpak_compose_info()

        module_spec = ModuleSpec.from_str(compose_info.source_spec)

        source_info = FlatpakSourceInfo(flatpak_yaml, compose_info.modules,
                                        compose_info.main_module,
                                        module_spec.profile)
        return source_info
    def _load_source(self):
        flatpak_yaml = self.workflow.source.config.flatpak

        compose_info = get_flatpak_compose_info(self.workflow)

        module_spec = ModuleSpec.from_str(compose_info.source_spec)

        source_info = FlatpakSourceInfo(flatpak_yaml, compose_info.modules,
                                        compose_info.main_module,
                                        module_spec.profile)
        set_flatpak_source_info(self.workflow, source_info)
Example #3
0
def setup_flatpak_source_info(workflow, config=APP_CONFIG):
    compose = setup_flatpak_compose_info(workflow, config)

    flatpak_yaml = yaml.safe_load(config['container_yaml'])['flatpak']

    module_spec = ModuleSpec.from_str(compose.source_spec)

    source = FlatpakSourceInfo(flatpak_yaml, compose.modules, compose.base_module,
                               module_spec.profile)
    set_flatpak_source_info(workflow, source)

    return source
Example #4
0
def setup_flatpak_source_info(config=None):
    config = APP_CONFIG if config is None else config
    compose = setup_flatpak_compose_info(config)

    flatpak_yaml = yaml.safe_load(config['container_yaml'])['flatpak']

    module_spec = ModuleSpec.from_str(compose.source_spec)

    source = FlatpakSourceInfo(flatpak_yaml, compose.modules, compose.main_module,
                               module_spec.profile)

    return source
    def _load_source(self):
        flatpak_yaml = self.workflow.source.config.flatpak

        compose_info = get_compose_info(self.workflow)
        if compose_info is None:
            raise RuntimeError(
                "resolve_module_compose must be run before flatpak_create_dockerfile"
            )

        module_spec = split_module_spec(compose_info.source_spec)

        return FlatpakSourceInfo(flatpak_yaml, compose_info.modules,
                                 compose_info.base_module, module_spec.profile)