Summary: | Freshly installed Neon doesn't have a populated Appstream os-catalog (/var/lib/swcatalog/yaml is empty) | ||
---|---|---|---|
Product: | [KDE Neon] neon | Reporter: | Malte S. Stretz <mss> |
Component: | Live/Install images | Assignee: | Neon Bugs <neon-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jr, neon-bugs, sitter |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Neon | ||
OS: | Linux | ||
URL: | https://github.com/ximion/appstream/issues/513 | ||
See Also: | https://bugs.kde.org/show_bug.cgi?id=474402 | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Malte S. Stretz
2023-09-15 08:46:46 UTC
I tried to find out who is responsible for creating those symlinks but failed. One thing I found though is https://bugs.launchpad.net/snap-store-desktop/+bug/1966142/comments/6 which mentions that /var/lib/swcatalog was called /var/lib/app-info before appstream 0.15.2 (yay for changing stuff like this in patch releases!) and a symlink should exist. /var/lib/app-info is indeed a symlink on the old system but is missing on the new one. Maybe apt or whatever tries to put the symlinks into the old location and since that one can't be found it fails silently? Some more spelunking brought me to /etc/apt/apt.conf.d/50appstream which contains a call to appstreamcli refresh --source=os and when I execute that in debug mode it looks like it should create the symlinks but fails because... it thinks they exist already??? But that's not the case... WTF?
> sudo appstreamcli refresh --source=os --verbose
> ** (appstreamcli:22014): DEBUG: 11:06:54.638: run appstreamcli: refresh
> • Updating software metadata cache for the operating system.
> ** (appstreamcli:22014): DEBUG: 11:06:54.638: Scanning for metadata changes in the APT cache.
> (appstreamcli:22014): GLib-GIO-DEBUG: 11:06:54.638: _g_io_module_get_default: Found default implementation local (GLocalVfs) for ‘gio-vfs’
> ** (appstreamcli:22014): DEBUG: 11:06:54.640: File '/var/lib/swcatalog/yaml/security.ubuntu.com_ubuntu_dists_jammy-security_main_dep11_Components-amd64.yml.gz' missing, cache update is needed.
> ** (appstreamcli:22014): DEBUG: 11:06:54.640: Unable to set symlink (/var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_jammy-security_main_dep11_Components-amd64.yml.gz -> /var/lib/swcatalog/yaml/security.ubuntu.com_ubuntu_dists_jammy-security_main_dep11_Components-amd64.yml.gz): File exists
> ** (appstreamcli:22014): DEBUG: 11:06:54.640: Unable to set symlink (/var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_jammy-security_universe_dep11_Components-amd64.yml.gz -> /var/lib/swcatalog/yaml/security.ubuntu.com_ubuntu_dists_jammy-security_universe_dep11_Components-amd64.yml.gz): File exists
> ** (appstreamcli:22014): DEBUG: 11:06:54.640: Unable to set symlink (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-updates_main_dep11_Components-amd64.yml.gz -> /var/lib/swcatalog/yaml/archive.ubuntu.com_ubuntu_dists_jammy-updates_main_dep11_Components-amd64.yml.gz): File exists
> ** (appstreamcli:22014): DEBUG: 11:06:54.640: Unable to set symlink (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-updates_universe_dep11_Components-amd64.yml.gz -> /var/lib/swcatalog/yaml/archive.ubuntu.com_ubuntu_dists_jammy-updates_universe_dep11_Components-amd64.yml.gz): File exists
> ** (appstreamcli:22014): DEBUG: 11:06:54.640: Unable to set symlink (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-updates_multiverse_dep11_Components-amd64.yml.gz -> /var/lib/swcatalog/yaml/archive.ubuntu.com_ubuntu_dists_jammy-updates_multiverse_dep11_Components-amd64.yml.gz): File exists
> ** (appstreamcli:22014): DEBUG: 11:06:54.640: Unable to set symlink (/var/lib/apt/lists/archive.neon.kde.org_user_dists_jammy_main_dep11_Components-amd64.yml.gz -> /var/lib/swcatalog/yaml/archive.neon.kde.org_user_dists_jammy_main_dep11_Components-amd64.yml.gz): File exists
> ** (appstreamcli:22014): DEBUG: 11:06:54.640: Unable to set symlink (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy_main_dep11_Components-amd64.yml.gz -> /var/lib/swcatalog/yaml/archive.ubuntu.com_ubuntu_dists_jammy_main_dep11_Components-amd64.yml.gz): File exists
> ** (appstreamcli:22014): DEBUG: 11:06:54.640: Unable to set symlink (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy_multiverse_dep11_Components-amd64.yml.gz -> /var/lib/swcatalog/yaml/archive.ubuntu.com_ubuntu_dists_jammy_multiverse_dep11_Components-amd64.yml.gz): File exists
> ** (appstreamcli:22014): DEBUG: 11:06:54.640: Unable to set symlink (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy_universe_dep11_Components-amd64.yml.gz -> /var/lib/swcatalog/yaml/archive.ubuntu.com_ubuntu_dists_jammy_universe_dep11_Components-amd64.yml.gz): File exists
> ** (appstreamcli:22014): DEBUG: 11:06:54.640: run AsPool:load
> ** (appstreamcli:22014): DEBUG: 11:06:54.640: Pruning old cache data.
> ** (appstreamcli:22014): DEBUG: 11:06:54.641: Not adding metadata catalog location '/usr/share/swcatalog': Not a directory, or does not exist.
> ** (appstreamcli:22014): DEBUG: 11:06:54.641: run AsPool:load_catalog_data
> ** (appstreamcli:22014): DEBUG: 11:06:54.641: Searching for YAML data in: /var/lib/swcatalog/yaml
> ** (appstreamcli:22014): DEBUG: 11:06:54.641: Storing cache data for section: system:en-US-os-catalog
> ** (appstreamcli:22014): DEBUG: 11:06:54.641: Writing cache file: /var/cache/swcatalog/cache/en-US-os-catalog.xb
> ** (appstreamcli:22014): DEBUG: 11:06:54.652: Using cached metadata: local-metainfo
> ** (appstreamcli:22014): DEBUG: 11:06:54.653: Using cache file: /var/cache/swcatalog/cache/en-US-local-metainfo.xb
> ✔ Metadata cache was updated successfully.
> # ls -l /var/lib/swcatalog/yaml/security.ubuntu.com_ubuntu_dists_jammy-security_main_dep11_Components-amd64.yml.gz
> ls: cannot access '/var/lib/swcatalog/yaml/security.ubuntu.com_ubuntu_dists_jammy-security_main_dep11_Components-amd64.yml.gz': No such file or directory
Oh, I got it! It is the good old "symlink argument order is confusing to some people" issue:
> # sudo strace appstreamcli refresh --source=os --verbose 2>&1 | grep /var/lib/swcatalog/yaml/archive.neon
> access("/var/lib/swcatalog/yaml/archive.neon.kde.org_user_dists_jammy_main_dep11_Components-amd64.yml.gz", F_OK) = -1 ENOENT (No such file or directory)
> symlink("/var/lib/swcatalog/yaml/archive.neon.kde.org_user_dists_jammy_main_dep11_Components-amd64.yml.gz", "/var/lib/apt/lists/archive.neon.kde.org_user_dists_jammy_main_dep11_Components-amd64.yml.gz") = -1 EEXIST (File exists)
> write(1, "** (appstreamcli:22100): DEBUG: "..., 275** (appstreamcli:22100): DEBUG: 11:15:06.968: Unable to set symlink (/var/lib/apt/lists/archive.neon.kde.org_user_dists_jammy_main_dep11_Components-amd64.yml.gz -> /var/lib/swcatalog/yaml/archive.neon.kde.org_user_dists_jammy_main_dep11_Components-amd64.yml.gz): File exists
Great and here is the upstream bug filed by Harald already: https://github.com/ximion/appstream/issues/513 I am closing this as fixed since upstream has merged the fix and I am sure this will be picked up by neon once it is released. For now, this is the workaround (amend the line for other arches than amd64): sudo true && ls -1 /var/lib/apt/lists/*_Components-amd64.yml.gz | sudo xargs -r ln -s -t /var/lib/swcatalog/yaml/ |