On Sunday, January 12, 2025 2:21:12 PM MST Agustin Martin wrote:
> I think that the ideal way to handle this in the general case is by making
> other init systems support /etc/environment.d together with /etc/environment
> as systemd does. sysvinit is still in the archive
> (https://tracker.debian.org/pkg/sysvinit), with upstream home page
> (https://github.com/slicer69/sysvinit). I see something named finit-sysv,
> but I do not know whether it supports /etc/environment.d. upstart seems gone
> from the archive.

I would be supportive of this idea.  Do you have any sense if other init system 
would be 
open to supporting /etc/environment.d?

> I also wonder if in this particular case this path can be hardcoded in
> qtwebengine, chromium or whatever requires it.

I would be possible to patch out the code in Qt WebEngine that looks for .bdic 
locations 
(there are several fallbacks, including both system and user directories).  
However, given 
that Qt WebEngine already has a mechanism for setting this via an environment 
variable, I 
would be hesitant to modify the upstream behavior that some user or program 
might 
expect to be present.

For reference, the code for the dictionary search routine is at:

https://sources.debian.org/src/qt6-webengine/6.7.2%2Bdfsg2-1/src/core/
web_engine_library_info.cpp/#L243

> > The solution is probably to have the qtwebengine-data packages add this same
> > environment variable to /etc/environment.  My question regards the best way
> > to manage this, especially in the case of uninstallations.
> 
> AFAIK there is no standard way to manipulate /etc/environment. Depending on
> whether local changes in it are allowed or not you may need different
> approaches. If all local changes are expected under /etc/environment.d/
> `cat' might be enough. Otherwise things get more complex and sed might be
> needed. In both cases, I would not try any automated way without first
> asking debian-devel mailing list, in case some bad interference is detected.

ACK.

> But I really hope this trickery not be needed.
> 
> Another thing, I do not understand why this bug report is filed against
> dictionaries-common-dev.

This bug is filed against dictionaries-common-dev because that package produces 
the 
dictionaries policy documented at:

/usr/share/doc/dictionaries-common-dev/dsdt-policy.html

The setting of the QTWEBENGINE_DICTIONARIES_PATH environment variable by the Qt 
WebEngine packages was part of the solution to:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1020387

The current text of dsdt-policy reads:

The Qt packages will install the following system-wide environment variable in 
/etc/
environment.d/ so that programs that use Qt WebEngine will be able to find 
the .bdic dictionaries:
QTWEBENGINE_DICTIONARIES_PATH=/usr/share/hunspell-bdic/


file:///usr/share/doc/dictionaries-common-dev/dsdt-policy.html#hunspell-bdic

The bug is located here because whatever changes are decided upon should be 
documented by a change to this policy documentation, which closes this bug.

-- 
Soren Stoutner
[email protected]

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to