On Fri, 25 Feb 2022 13:49:57 +0100, Marguerite Su wrote:
Takashi Iwai
于2022年2月25日周五20:05写道: I guess this could be simplified if we provide some rpm macro. Basically a similar setup has been done for /etc/X11/xim.d (even manually), and we may combine even both stuff in a single macro
I begin to understand your approach now. If you make the generator itself as update alternative, the generator script will be very very easy: you just need to print INPUT_METHOD=<your input method framework name>. But since the update alternative approach involves many different files, I don’t think any rpm macro is possible. And again, rpm macro for all IMFs needs another new package. I added this new package to automatically transfer the existing XIM works to systemd/wayland since Xorg will not go away in the foreseeable future. You don’t need to heavily touch other existing IMF packages. I don’t think a new package + heavy modifications for all existing packages works better than my approach.
But still, like the name says, an user environment generator can not work as the 100% replacement for the xim script. We still need to write lots of systemd stuff (targets and etc) to achieve the goals that were done via the LibreOffice/gsettings hacks, if you want to end up to an IMF systemd service
Let's try to implement some example cases and see how much work would be needed. An rpm macro usage I suggested can be done at any later point as a cleanup once after the stuff starts working, too.
Hm, then the question is whether we want to user leaving without language-specific IM when user installs in CJK locale (or anything else). Of course, they can install the stuff later at any time, but the point of having lang(x)-Provides or whatever meta data is just to "recommend" the installation of those packages for specific locales. A similar stuff could be implemented in patterns as well, but I feel that locale(x) makes maintenance easier.
OFF TOPIC: where can I find how these Provides are used? In which package? I used to investigate lots of packages and OBS settings, but I didn’t find any clue about this mechanism :-( So I wonder maybe these Provides are useless, but the person who sees them made it happen by manually adding those packages to ISOs :-)
It's a mechanism that is used by zypper and YaST, and it should still work (otherwise we need to report a bug). With those meta data, the packages will be selected automatically on YaST when you enable the corresponding locale in YaST language module. That is, if you install the system from the beginning in Japanese locale, the packages with lang(ja) will be automatically added as recommended packages. I don't know of any documentation about it, as this being a very long-standing feature. Takashi