On Wed, Aug 28, 2024 at 07:32:36AM +0200, Jan Tojnar wrote: > > Yes, since `$datadir` can be set by user to an arbitrary path > (typically by passing a `--datadir` flag to `./configure`), it can > indeed happen that the project will be installed to a location that is > not on `XDG_DATA_DIRS` and thus, for example, its desktop files will > not be found by the environment. [1] > > But, in the end, I agreee with John that the selection of installation > paths and environment variables and ensuring consistency (if desired) > is the responsibility of the environment (e.g. a Linux distribution). > > [1]: If execution of a program installed in such inconsistent > environments is anticipated (e.g. for development), it might be a good > idea for the project to hardcode `$datadir` path at build time, so > that, at runtime, it can search for its data there in addition to > `$XDG_DATA_DIRS`. Alternately, the development environment may want to > provide a task runner command that sets environment variables > appropriately (e.g. `make run-uninstalled` or `meson devenv`).
I fully agree with that, but my point is that there is an need for an explaination in the specification that ensuring the consistency is outside of the scope of the specification, and maybe hint to some possible way to do it that are in the spirit of the specification in a open way. -- Pat
