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.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1644498

Title:
  apt-get update returns "AppStream cache update completed, but some
  metadata was ignored due to errors." periodically

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/appstream/+bug/1644498/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to