Comment 56 for bug 1644498

Revision history for this message
SunBear (sunbear-c22) wrote :

I am encountering the same after sudo apt update.
.........
AppStream system cache was updated, but problems were found: Metadata files have errors: /var/cache/app-info/xmls/fwupd.xml
Reading package lists... Done
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh-cache > /dev/null; fi'
E: Sub-process returned an error code

After reading the solution from https://askubuntu.com/a/1053844/541417, I did the following:
1. Backed up `fwupd.xml` and `50appstream`.
2. Performed the procedure mentioned in the link. I found the above mentioned errors disappeared during `sudo apt update` (tested for a few reboots).
3. I reinserted `50appstream` to it's original location, ran `sudo appstreamcli refresh --force` followed by `sudo apt update`; no error msg appeared.
4. After reinserting `fwupd.xml` to its original location, and running `sudo appstreamcli refresh --force` followed by `sudo apt update`, I found the above mentioned error reappearing. Specifically,

`AppStream system cache was updated, but problems were found: Metadata files have errors: /var/cache/app-info/xmls/fwupd.xml.`

So `fwupd.xml` really caused the error. Opening the file, the document mentioned the error was in line 265. Reading https://askubuntu.com/a/1053018/541417 and https://github.com/hughsie/8bitdo-firmware/commit/7b8eff0c8bb75336c6fd8aca13f9f5093abc5fd7#diff-81541301f84363c9ec1c910b8b45cdb8R32.

I concluded the issue is really caused by the typo in line 265 of `fwupd.xml`. Need to change

<checksum filename="Firmware_SF30&SN30_Pro_V1.23.dat" target="content"/>

to

<checksum filename="Firmware_SF30&amp;SN30_Pro_V1.23.dat" target="content"/>.

That is symbol `&` should change to `&amp;`. Then save the file.

After this fix, when I run 'sudo apt update', every thing works again.