John Darrington <j...@darrington.wattle.id.au> skribis: > On Tue, Nov 29, 2016 at 03:34:11PM +0100, Ludovic Court??s wrote: > John Darrington <j...@darrington.wattle.id.au> skribis: > > > We can cut down on the size of this string iff we can somehow > > guarantee that no package ever ships a file in any of those locations. > > > > Some "solutions" (in my order of preference) are: > > > > * The size of the above list can be halved, by dropping either the > > .../lib/... or the .../share/... items - we just have to then make > > sure that no package ships resource files in the one we drop. > Historically, > > resource files were always in .../lib (as still are all official > > sources from x.org) but recently third party packages have started > > putting them in .../share. > > > > * I *think* we could also get away with further reducing the set to > > "$HOME/.guix-profile/lib/X11/%T/%N%S: > > /run/current-system/profile/lib/X11/%T/%N%S" > > because, all the Xt dependent packages I've seen so far, put their > > resource files there. However, we cannot know what might get added > > in the future. > > Right, if we do both, that???s already much better. > > > * Hack the hard coded defaults in the libXt source to use the profile > > settings instead of /usr > > Maybe we should just do that, no? It???d be a local change, it would > achieve the same effect, and it would provide a good default. > > WDYT? > > It sounds unreliable to me. What would we set it to? > $GUIX_PROFILE/... $HOME/.guix-profile/... /run/current-system/profile/... > There's no guarantee that the current profile is any of those.
Maybe, but that would have the same effect as setting the environment variable to that value, wouldn’t it? > Something similar to the first solution seems prefereable to me. Maybe: > > Set XFILESEARCHPATH to > "$HOME/.guix-profile/lib/X11/%T/%N%S:/run/current-system/profile/lib/X11/%T/%N%S" > (we can substitute "share" for "lib" if we want to keep the FHS people > happy). How did you manage to shorten it that much? It’s much less intimidating now. :-) > Then we audit all users of libxt to make sure they put their resource files > in lib/X11/app-defaults. > Most packages have a --with-app-defaults configure option (which currently > we are in many cases > either not using or misusing). > > We could also consider adding a build stage to make sure that packages which > depend on libXt put > their resource files in the "right" place. Sounds reasonable. Ludo’.