On Fri, Jan 10, 2025 at 05:04:58PM -0700, Soren Stoutner wrote:
> Package: dictionaries-common-dev
> Version: 1.30.3
> Severity: normal
> Control: affects -1 libqt5webengine-data
> Control: affects -1 libqt6webengine6-data
> Control: affects -1 scowl
> 
> I have been informed that the method we used when resolving #1020387 to set 
> the
> Qt WebEngine binary dictionary location environment variable only works when
> Systemd is the init system.> 
> libqt5webengine-data installs the following file:
> 
> /etc/environment.d/90qtwebengine-dictionaries-path.conf
> 
> with contents:
> 
> QTWEBENGINE_DICTIONARIES_PATH=/usr/share/hunspell-bdic/
...
> However, it has been reported to me that if a system is running an init system
> different than Systemd the /etc/environment.d/ directory is not parsed.  
> Rather,
> other init systems only parse the single file /etc/environment (which, in 
> turn,
> isn't parsed by Systemd).

Hi, Soren,

Using /etc/environment.d seemed to me so reasonable that I thought it was a
Debian choice for all init systems. I now notice that this is not true and
other non systemd init systems may not support it.

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 also wonder if in this particular case this path can be hardcoded in
qtwebengine, chromium or whatever requires it.

> 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.

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. 

Regards,

-- 
Agustin

Reply via email to