#94 summarizer: better handling of local yaml files
Closed by nphilipp. Opened by rdossant.
modularity/ rdossant/fedmod summarize-libmmd-fix  into  master

Download 94.patch

When reading a packager-provided yaml module file, some optional
information like module name, module stream or module defaults can be
missing. These are usually filled out by the module build service from
the module's git repo. So to correctly handle local yamls, we cannot use
the same modulemd_index_from_file call for both local and repo yamls.

See https://github.com/fedora-modularity/libmodulemd/issues/125

Signed-off-by: Rafael dos Santos rdossant@redhat.com

Metadata Update from @nphilipp:
- Request assigned

I'm wary about interpreting any raised GError as "no modules". How about:

    ...
    except gi.repository.GLib.GError as gerror:
        raise ClickException(f"Could not read {yaml}: {gerror}") from gerror
    ...

This would also mark the GError as the direct cause of the ClickException (raise ... from ...).

Looks good to me otherwise. Let me know what you think about handling the GError exceptions on which I commented above.

I'm fine with that. Should I send an update PR or will you make the change yourself?

I'll do it. Thanks for all the contributions in the recent past!

Applied in commits 287dbf3, dab13e6.

Pull-Request has been closed by nphilipp

Metadata