Skip to content
Snippets Groups Projects

exports: Don't try to export paths that refer to the container

Merged Simon McVittie requested to merge wip/log-exports into main
  1. Jul 17, 2023
    • Simon McVittie's avatar
      exports: Don't try to export paths that refer to the container · 4782d67f
      Simon McVittie authored
      We can have two kinds of filename in /overrides: either the symbolic
      link points to a path that is already going to be in the container,
      like /run/host/… or /usr/…, or it points to a path that is only
      in the container if we explicitly ask the FlatpakExports object to
      share it, like /home/….
      
      For the paths that are already set up for the container, it's
      both misleading and useless to go through the motions of asking
      FlatpakExports to share it. It's misleading because it looks for a
      container-side filename in an environment that probably won't have it,
      like /usr/lib/x86_64-linux-gnu/… on a Fedora system that only has
      /usr/lib64, and even if we do find it, it's not the version of that file
      that we want to use. It's also useless because even if we do find
      the desired filename on the host, FlatpakExports will refuse to export
      paths below a prefix such as /usr that is controlled by the runtime.
      
      A secondary benefit of this change is that it results in summarizing
      the contents of /overrides in a debug-level log, which is useful for
      situations like <https://github.com/ValveSoftware/Dota-2/issues/2392
      
      >
      where we suspect that those contents might be wrong.
      
      Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
      4782d67f
Loading