Bug 1580162 - Fails to update (no such file or directory for appstream in /var/cache)
Summary: Fails to update (no such file or directory for appstream in /var/cache)
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: PackageKit
Version: 28
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Richard Hughes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-20 22:41 UTC by Sylvia van Os
Modified: 2020-07-20 07:44 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-28 23:15:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Sylvia van Os 2018-05-20 22:41:34 UTC
Description of problem:
PackageKit fails to check for updates with the following error:

Fatal error: Error when getting information for file “/var/cache/PackageKit/28/metadata/taw-Riot/repodata/37cbbc0f7f939386c5c86248c02302b215339f73ba53af3bef1ef56e17bc644c-appstream.xml.gz”: No such file or directory

Noticeably, dnf works fine.

Version-Release number of selected component (if applicable):


How reproducible:
I'm not sure how it went wrong, but every update check simply fails with this error. Commands like "pkcon refresh force" and "pkcon update" fail in the exact same way.

Steps to Reproduce:
1. Run "pkcon update"

Actual results:
$ pkcon update
Getting updates               [=========================]         
Finished                      [                         ] (0%)  Command failed: Error when getting information for file “/var/cache/PackageKit/28/metadata/taw-Riot/repodata/37cbbc0f7f939386c5c86248c02302b215339f73ba53af3bef1ef56e17bc644c-appstream.xml.gz”: No such file or directory

Expected results:
PackageKit updates packages

Additional info:
This started happening after upgrading my Fedora 27 to 28. The update otherwise went flawlessly for as far as I can tell. I've already tried "sudo dnf clean all" as well, with no success. I was told on IRC to report this on the bugtracker.

Comment 1 Rex Dieter 2018-05-21 01:22:02 UTC
It appears you're using a repo that claims to support appdata but doesn't actually provide it.

Comment 2 Sylvia van Os 2018-05-21 13:47:52 UTC
Made an upstream report to https://github.com/taw00/riot-rpm/issues/14, which is the upstream behind https://copr.fedorainfracloud.org/coprs/taw/Riot/. Still odd to me that PackageKit has issues with it that completely break PackageKit (cannot update anything else through it anymore either), but dnf will update from this repo just fine.

Comment 3 Rex Dieter 2018-05-21 19:13:02 UTC
dnf doesn't use appdata, if the repo does not include appdata, it should not include:
enabled_metadata=1

Comment 4 Rex Dieter 2018-05-21 19:14:00 UTC
Possible it's a copr bug, I've seen several cases are appdata doesn't get generated properly.

Comment 5 Todd Warner 2018-05-27 05:09:31 UTC
riot provides appdata as is required for desktop applications...
```
[todd@localhost ~]$ rpm -ql riot |grep appdata
/usr/share/metainfo/riot.appdata.xml
```

I'm not sure I understand the issue.
Note: I am the maintainer of this RPM. If I am doing something incorrectly, I would love to know. Thanks!

Comment 6 piglist 2018-08-23 10:05:45 UTC
This is an issue with tons of COPR and third-party repositories. And for some reason the entire repo refresh operation will fail just because you have one repo without valid appdata.

Something really has to be done about this as soon as possible if the GUI updater is to remain reliable.

Comment 7 Matthias Runge 2018-09-21 06:22:46 UTC
I see this issue for disabled repos.

Fatal error: Error when getting information for file “/var/cache/PackageKit/28/metadata/rpmfusion-nonfree-nvidia-driver/repodata/appstream.xml.gz”: No such file or directory


pkcon repo-list
...
 Disabled   rpmfusion-nonfree-nvidia-driver RPM Fusion for Fedora 28 - Nonfree - NVIDIA Driver
 Disabled   rpmfusion-nonfree-nvidia-driver-debuginfo RPM Fusion for Fedora 28 - Nonfree - NVIDIA Driver Debug
 Disabled   rpmfusion-nonfree-nvidia-driver-source RPM Fusion for Fedora 28 - Nonfree - NVIDIA Driver Source
...


There seems to be something fishy with this.

However, I can confirm, making sure
https://bugzilla.redhat.com/show_bug.cgi?id=1580162#c3
this works around the issue.

Comment 8 Mikel Pérez 2018-10-28 23:49:19 UTC
it also breaks package install suggestion on the console when it cannot find a program in the PATH

Comment 9 Gergely Gombos 2018-11-07 20:48:37 UTC
Getting the same issue on F29, breaking GNOME Software updates.
$ sudo pkcon refresh force -c -1

[...] „/var/cache/PackageKit/29/metadata/rpmfusion-nonfree-nvidia-driver-29-x86_64/repodata/appstream.xml.gz” [...]: No such file or directory

Comment 10 Ben Cotton 2019-05-02 20:21:12 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 11 Ben Cotton 2019-05-28 23:15:40 UTC
Fedora 28 changed to end-of-life (EOL) status on 2019-05-28. Fedora 28 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 12 Rob Thijssen 2020-07-20 06:54:58 UTC
still an issue on f30:

$ sudo pkcon refresh force -c -1
Refreshing cache              [=========================]         
Waiting for authentication    [=========================]         
Loading cache                 [=========================]         
Downloading repository information[=========================]         
Loading cache                 [=========================]         
Downloading repository information[=========================]         
Loading cache                 [=========================]         
Downloading repository information[=========================]         
Loading cache                 [=========================]         
Downloading repository information[=========================]         
Loading cache                 [=========================]         
Downloading repository information[=========================]         
Finished                      [=========================]         
Fatal error: Error when getting information for file “/var/cache/PackageKit/30/metadata/fedora-spotify-30-x86_64/repodata/fb4c6198be4c32c5ffe7eee818ffb7b828d46096d22f2512ec7e765909ba4e01-appstream.xml.gz”: No such file or directory

Comment 13 Rob Thijssen 2020-07-20 07:44:06 UTC
(In reply to Rex Dieter from comment #3)
> if the repo does not include appdata, it should not include:
> enabled_metadata=1

this comment helped me to find a fix for my f30 system.

it turns out that pkcon expects to find file permissions of 0644 on repository files (/etc/yum.repos.d/*.repo on f30). if it doesn't find this, it treats the .repo file as if it included a `enabled_metadata=1` directive, even if the file contains no such directive and even if pkcon is run with sudo (eg: `sudo pkcon refresh force -c -1`).

$ grep -rnw /etc/yum.repos.d/ -e 'enabled_metadata=1'
/etc/yum.repos.d/fedora-cisco-openh264.repo:6:enabled_metadata=1
grep: /etc/yum.repos.d/fedora-spotify.repo: Permission denied
/etc/yum.repos.d/rpmfusion-nonfree-nvidia-driver.repo:6:enabled_metadata=1
...

on my f30 system, `stat -c '%a %n' /etc/yum.repos.d/*.repo` showed that all but one of my .repo files had permissions of 0644, whereas /etc/yum.repos.d/fedora-spotify.repo had permissions of 0600:

$ stat -c '%a %n' /etc/yum.repos.d/*.repo 
...
644 /etc/yum.repos.d/fedora.repo
600 /etc/yum.repos.d/fedora-spotify.repo
644 /etc/yum.repos.d/fedora-updates-modular.repo
...

the fix was simple. just make sure that repo files have permissions of 0644:

$ sudo chmod a+r /etc/yum.repos.d/*.repo

after fixing these permissions, pkcon correctly detects that there is no `enabled_metadata=1` directive in my spotify repo config and does not trip over it's own shoelaces anymore.


Note You need to log in before you can comment on or make changes to this bug.