Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error reading fwupd appinfo #32

Closed
iainlane opened this issue Apr 9, 2016 · 3 comments
Closed

Error reading fwupd appinfo #32

iainlane opened this issue Apr 9, 2016 · 3 comments
Assignees

Comments

@iainlane
Copy link
Contributor

iainlane commented Apr 9, 2016

Hi ximion! Hope you got back okay

fwupd's appinfo can't be read by appstream currently. In sid (install fwupd and appstream, then apt-get update):

(sid-amd64)root@nightingale:/# appstreamcli refresh-index --force --verbose
** (appstreamcli:5971): DEBUG: Refreshing AppStream cache
** (appstreamcli:5971): DEBUG: Reading: /usr/share/app-info/xmls/org.freedesktop.fwupd.xml
** (appstreamcli:5971): DEBUG: WARNING: Invalid component: [Component::UEFI-dummy-dev0]> name: UEFI Updates | package: ? | summary: Enable UEFI Update Functionality
** (appstreamcli:5971): DEBUG: Reading: /var/lib/app-info/yaml/ftp.debian.org_debian_dists_sid_non-free_dep11_Components-amd64.yml.gz
** (appstreamcli:5971): DEBUG: Reading: /var/lib/app-info/yaml/ftp.debian.org_debian_dists_sid_main_dep11_Components-amd64.yml.gz
** (appstreamcli:5971): DEBUG: Reading: /var/lib/app-info/yaml/ftp.debian.org_debian_dists_sid_contrib_dep11_Components-amd64.yml.gz
** (appstreamcli:5971): DEBUG: Detected colliding ids: flcheckers.desktop was already added with the same priority.
** (appstreamcli:5971): DEBUG: Detected colliding ids: flsudoku.desktop was already added with the same priority.
** (appstreamcli:5971): DEBUG: Detected colliding ids: flblocks.desktop was already added with the same priority.
** (appstreamcli:5971): DEBUG: Detected colliding ids: emacs24-term.desktop was already added with the same priority.
** (appstreamcli:5971): DEBUG: zathura-pdf-poppler.desktop extends zathura.desktop, but zathura.desktop was not found.
** (appstreamcli:5971): DEBUG: Removing old rebuild-dir from previous database rebuild.
AppStream cache update completed, but some metadata was ignored due to errors.

If you delete the first component then the warning just moves to the next one.

I assume this is going to break firmware updates?

@ximion ximion added the bug label Apr 11, 2016
@ximion ximion self-assigned this Apr 11, 2016
@ximion
Copy link
Owner

ximion commented Apr 11, 2016

This likely won't break fwupd, but it's a bug regardless of that - the firmware components won't be in the cache because of this, which is really bad.
The actual cause is a too strict check on installation candidates, which we do before considering the component as valid. I am inclined to remove that check alltogether, and have software centers do that check instead.
This would also allow us to load metainfo files into the pool and have software centers resolve them to packages using PackageKit (this would be a prerequisite for fixing #3 )

ximion added a commit that referenced this issue Apr 11, 2016
The is_valid function should only do minimal validation of the values of
an AppStream component, and having an installation candidate is no
prerequisite for being valid anymore.
(But an id, name and summary are always required, no matter what the
component type is)

This is the first piece needed for resolving #32
ximion added a commit that referenced this issue Apr 11, 2016
…ng it

This is the second part needed before #32 can be resolved.
ximion added a commit that referenced this issue Apr 11, 2016
This ensures we know about all data and can merge components properly if
required, before validating them.
This means we now allow the parsers to throw out invalid components by
default, and it is the callers responsibility now to check for validity.

Another step towards fixing #32
@ximion ximion added the core label Apr 11, 2016
@ximion
Copy link
Owner

ximion commented Apr 11, 2016

Crap, this actually does break things severely - not the fwupd stuff, but if things are loaded in the wrong order, this will severely break the components pool itself, due to GNOME Software placing invalid metadata in /usr/share/app-info/xmls/org.gnome.Software.xml.gz now. All stuff mentioned in there will be ignored if this gets loaded prior to the valid data.
I will fix this next, the other changes are prerequisites for this.
Pretty bad timing so short before releasing... I will make this high-priority.

ximion added a commit that referenced this issue Apr 12, 2016
I am not sure if the way GNOME Software places invalid data in the
distro metadata directory is actually a sane thing... Especially because
this hijacks the global AppStream namespace and injects new metadata (in
this case, the non-standard "featured" category), which will then be
available to all software centers (which might want to define their own
"featured" apps, e.g. KDE Discover might want to feature its own apps).

At least we don't fail hard on these stub metadata entries now and can -
relatively reliably - filter them out and merge them.

This ŕesolves #32
@ximion
Copy link
Owner

ximion commented Apr 12, 2016

This issue should be solved now - can you please test with Git master if that is the case for you too?
These changes were way more invasive than I wanted them to be, but so far I spotted no issues and the testsuite passes.
I am really not sure if GNOME Software is doing a sane thing here with its extra metadata, I'll ask hughsie about that.

Also, I will make an AppStream release this week, or next Monday (next Monday would be a bit more likely atm, I want some more testing of the changes).

@ximion ximion closed this as completed Apr 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants