Hello, 宋文武 <iyzs...@envs.net> skribis:
> Yes, we introduced GUIX_PYTHONPATH, GUIX_GTK* to avoid ABI > incompatibility problems between different programs from foreign systems > and Guix systems. But XDG_DATA_DIRS, as it's designed for shareable > data files, won't have ABI incompatibility problems, and we rely on it > for a foreign desktop launch to find applications (via desktop files), > fonts installed from Guix. (I hadn’t realized GUIX_GTK* and GUIX_GDK* already exist…) > So do we need 'GUIX_XDG_*'? Well, In 'wrap-program' we can specifiy how > the wrapped environment variables are going to be combined with the > system level variables in 3 positions: prefix, suffix or = (exact). The > priority between wrapped and system level variables influence the > robustness of programs. > > For plugins which might have ABI problems, we'll use 'prefix', so a > wrapped program always load the correct ones (eg: qtbase) first, and > hopefully they can ignore the possible incompatible ones (eg: a qt > theme plugin) with reduced functions but still works. > > Or for not real search paths which only support a single directory or > file, we'll use '=' (eg: SSL_CERT_FILE). > > But for XDG_DATA_DIRS and XDG_CONFIG_DIRS, we'll want to use 'suffix', > so that the shared combined data (icons, mime databases) will be used > instead of a seperated incomplete ones. Also it allow user to customize > them as usually, or 'guix home' or 'guix system' to custom them at > profile level. I understand this, but I’m not sure how it releases to GUIX_-prefixing more variables. > In the specified search-paths.d implementation, for simplify reason, the > envs from search-paths.d files are always used in 'prefix' way. For '=' > cases, we could patch it to a real search path (eg: > GUIX_GDK_PIXBUF_MODULE_FILES), or hardcode it (eg: > QTWEBENGINEPROCESS_PATH #75966). For 'suffix' cases, it uses 2 > variables, that's prefer XDG_DATA_DIRS (set by profile or foreign > system) over GUIX_XDG_DATA_DIRS (set by search-paths.d, not leaking). Uh. Having GUIX_XDG_DATA_DIRS at all sounds like a problem to me. >>> - `GUIX_INTERPRETER_FILE`: absolute file name of the interpreter >>> - `GUIX_MAIN_SCRIPT_FILE`: absolute file name of the script >> >> We won’t patch every interpreter out there, that’s not reasonable. > > Yes, python should be the most, also we can avoid patching and still use > 'wrap-program' for them. Hmm OK. >> Overall, I think I’d be reassured if we reduced the scope a little bit: >> don’t insist on the “GUIX_” prefix, focus on GTK and Qt applications. > > Okay, I'll send GUIX_GIO_EXTRA_MODULES as a seperated patch later. For > 'GUIX_XDG_DATA_DIRS' and 'GUIX_XDG_CONFIG_DIRS', do you think the > current implementation plan (GUIX_ ones only used by search-paths.d, > only XDG_DATA_* still set by profile and visible, use 2 variables due to > simplify reason) fine? I’m not sure I fully understand what “only used by search-paths.d” means; I would prefer not introducing any GUIX_-prefixed variable as part of this work. Adding these variables could be discussed separately. Thanks for explaining! Ludo’.