Bug#1006269: appstream: apt hook shows non-actionable warnings if Flathub metadata has issues

2022-02-22 Thread Matthias Klumpp
Hi!

Am Di., 22. Feb. 2022 um 11:33 Uhr schrieb Simon McVittie :
>
> Package: appstream
> Version: 0.15.1-1
> Severity: normal
>
> I cannot reproduce this right now (it seems to be intermittent?), but
> the steps that previously reproduced it were:
>
> * Have flatpak installed
> * Have Flathub configured as a remote in the system repository
>   /var/lib/flatpak: https://flatpak.org/setup/Debian
> * Have appstream installed
> * `sudo apt update`, or the equivalent in aptitude

You will be able to reproduce this all the time by running:
sudo appstreamcli refresh --force

> Expected result: no error messages unless there is something that the
> sysadmin needs to resolve.
>
> Actual result, as reported at https://github.com/flatpak/flatpak/issues/4642
> and https://github.com/flathub/cc.nift.nsm/issues/3:
>
> ** (appstreamcli:11481): WARNING **: 21:53:33.554: Found icon of unknown 
> type 'unknown' in 'system/flatpak/flatpak/cc.nift.nsm/*', skipping it.
> ** (appstreamcli:11481): WARNING **: 21:53:33.554: Found icon of unknown 
> type 'unknown' in 'system/flatpak/flatpak/cc.nift.nsm/*', skipping it.
>
> If this happens again I'll try to capture the Appstream XML that Flathub was
> sending at the time.

This is an odd one... While there is nothing the user can do here, we
do want to know if the server was sending bad data. This was
originally intended to alert when there's bad data in the Debian
repositories, but since Flatpak data is cached too now in the same
pass, we get this message as well now. I am not sure if that's a good
or a bad thing though ^^
Potentially we could only generate caches for the OS data on APT
updates, and not Flatpak as well.

> appstreamcli should perhaps have a --quiet option that tries to recover
> from this sort of thing without issuing warnings, which could be used
> in the apt hook?

It actually does run in quiet mode :-) However, if there's an issue
that results in metadata being dropped entirely for $reasons, it
currently complains quite loudly so the server side can be fixed.

There seems to be something wrong with Flatpak's or Flathub's
AppStream generator (even if the input is bad, the output of the
server shouldn't be bad too!) - I was meaning to report that, but so
far didn't have the time. Looks like others were faster now :-D

Cheers,
Matthias


-- 
I welcome VSRE emails. See http://vsre.info/



Bug#1006269: appstream: apt hook shows non-actionable warnings if Flathub metadata has issues

2022-02-22 Thread Simon McVittie
Package: appstream
Version: 0.15.1-1
Severity: normal

I cannot reproduce this right now (it seems to be intermittent?), but
the steps that previously reproduced it were:

* Have flatpak installed
* Have Flathub configured as a remote in the system repository
  /var/lib/flatpak: https://flatpak.org/setup/Debian
* Have appstream installed
* `sudo apt update`, or the equivalent in aptitude

Expected result: no error messages unless there is something that the
sysadmin needs to resolve.

Actual result, as reported at https://github.com/flatpak/flatpak/issues/4642
and https://github.com/flathub/cc.nift.nsm/issues/3:

** (appstreamcli:11481): WARNING **: 21:53:33.554: Found icon of unknown 
type 'unknown' in 'system/flatpak/flatpak/cc.nift.nsm/*', skipping it.

** (appstreamcli:11481): WARNING **: 21:53:33.554: Found icon of unknown 
type 'unknown' in 'system/flatpak/flatpak/cc.nift.nsm/*', skipping it.

If this happens again I'll try to capture the Appstream XML that Flathub was
sending at the time.

appstreamcli should perhaps have a --quiet option that tries to recover
from this sort of thing without issuing warnings, which could be used
in the apt hook?

smcv