On Mon, Nov 5, 2018 at 9:49 AM Alexander Larsson <alexander.larsson@xxxxxxxxx> wrote: > > I just sent this mail, but was not a member, so pasting it here again > after joining: Also, for the same reason, I can't reply to keiths patch mail that adds a map on the dir config key. But, I don't think that is the right solution either. Its not theoretically impossible for flatpak to generate such a map for the /run/host/fonts key, but that is is both complex and not enough. For an example of the complexity, the exact expanded mapping of /run/host/user-fonts would be dynamic, so flatpak would have to automatically generate it at runtime. But, even if we did that, the "regular" mapping of the standard dirs would still be wrong in the sandbox: <dir>/usr/share/fonts</dir> The actual location of this directory on the host is something like: /var/lib/flatpak/runtime/org.freedesktop.Platform/x86_64/18.08/73e812f33b03b170bda57c577a2ff9f15f6fe88f6b16d43415311c72751d7693/files/share/fonts/ (depending on what runtime and what version, etc), so we would have to inject that in the config somehow. Unless we had special code to expand the standard directories like this, each runtime, and each version of them would all map to the same cache and we would get stale data for it. And, this would affect other things than flatpak. For instance, Fedora silverblue uses ostree for the entire system. So the "host" /usr/share/fontconfig would similarly point to a directory that is checked out from ostree somewhere under /ostree/deploy, and if you updated to a new version it would point to something else, with different contents, but the same mtime and pathname, so you would get stale font cache data on the host too. And, flatpak is not the only thing that uses namespaces. These days it is common to use containers for all kinds of developement, for instance using docker or fedora toolbox[1]. It is common in these cases that you share the users homedir, and thus the fontconfig cache dir, while using a completely different /usr. This means that you will get improper cache aliasing between all the different container images. Not to mention old-school setups like shared NFS homedirs. I don't see why we can't just fix the empty-directory regenerating uuid case instead? [1] https://github.com/debarshiray/fedora-toolbox _______________________________________________ Fontconfig mailing list Fontconfig@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/fontconfig