Re: Proposal: Using update-alternative to switch input method

Marguerite Su <[email protected]> Fri, 25 Feb 2022 20:49:57 +0800
Newsgroups gmane.linux.suse.m17n
Message-ID <CAK0PdAkhM2+vq7u3imZ5zJdvv5d2G25E-Y0q3zgjHtaY9hEH2Q@mail.gmail.com>
--0000000000007bd1ec05d8d7234c
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Takashi Iwai <[email protected]>=E4=BA=8E2022=E5=B9=B42=E6=9C=8825=E6=97=A5 =E5=
=91=A8=E4=BA=9420:05=E5=86=99=E9=81=93=EF=BC=9A

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=3D<your input method framework name>. But
since the update alternative approach involves many different files, I
don=E2=80=99t 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=E2=80=99t need to heavily touch oth=
er
existing IMF packages. I don=E2=80=99t think a new package + heavy modifica=
tions
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

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=E2=80=
=99t 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 :-)


>

--0000000000007bd1ec05d8d7234c
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div>Takashi Iwai &lt;<a href=3D"mailto:[email protected]">[email protected]</a>&gt=
;=E4=BA=8E2022=E5=B9=B42=E6=9C=8825=E6=97=A5 =E5=91=A8=E4=BA=9420:05=E5=86=
=99=E9=81=93=EF=BC=9A</div><div><br></div><div><div class=3D"gmail_quote"><=
blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l=
eft-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rg=
b(204,204,204)" dir=3D"auto">
I guess this could be simplified if we provide some rpm macro.<br>
Basically a similar setup has been done for /etc/X11/xim.d (even<br>
manually), and we may combine even both stuff in a single macro</blockquote=
><div dir=3D"auto"><br></div><div dir=3D"auto">I begin to understand your a=
pproach now. If you make the generator itself as update alternative, the ge=
nerator script will be very very easy: you just need to print INPUT_METHOD=
=3D&lt;your input method framework name&gt;. But since the update alternati=
ve approach involves many different files, I don=E2=80=99t think any rpm ma=
cro is possible. And again, rpm macro for all IMFs needs another new packag=
e. I added this new package to automatically transfer the existing XIM work=
s to systemd/wayland since Xorg will not go away in the foreseeable future.=
 You don=E2=80=99t need to heavily touch other existing IMF packages. I don=
=E2=80=99t think a new package + heavy modifications for all existing packa=
ges works better than my approach.</div><div dir=3D"auto"><br></div><div di=
r=3D"auto">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 writ=
e lots of systemd stuff (targets and etc) to achieve the goals that were do=
ne via the LibreOffice/gsettings hacks, =C2=A0if you want to end up to an I=
MF systemd service</div><div dir=3D"auto"><br></div><blockquote class=3D"gm=
ail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left-width:1px;border-l=
eft-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)" dir=3D=
"auto">
Hm, then the question is whether we want to user leaving without<br>
language-specific IM when user installs in CJK locale (or anything<br>
else).=C2=A0 Of course, they can install the stuff later at any time, but<b=
r>
the point of having lang(x)-Provides or whatever meta data is just to<br>
&quot;recommend&quot; the installation of those packages for specific local=
es.<br>
A similar stuff could be implemented in patterns as well, but I feel<br>
that locale(x) makes maintenance easier.<br></blockquote><div dir=3D"auto">=
<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8=
ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-le=
ft-color:rgb(204,204,204)" dir=3D"auto"></blockquote><div dir=3D"auto">OFF =
TOPIC: where can I find how these Provides are used? In which package? I us=
ed to investigate lots of packages and OBS settings, but I didn=E2=80=99t f=
ind 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 tho=
se packages to ISOs :-)</div><div dir=3D"auto"><br></div><blockquote class=
=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left-width:1px;bo=
rder-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)" =
dir=3D"auto"><br>
</blockquote></div></div>

--0000000000007bd1ec05d8d7234c--