1 |
Hello, |
2 |
|
3 |
There is a number of virtuals in Gentoo which switching active |
4 |
implementation via eselect. However, most of the packages being |
5 |
'alternative providers' don't seem to care about eselect at all. Is |
6 |
that the correct thing to do, or maybe should every package ensure |
7 |
that after its removal another implementation is eselected |
8 |
(or a cleanup is done)? |
9 |
|
10 |
This issue was given my attention through bug 418217 [1]. Long story |
11 |
short -- there are applications which call pager implicitly. Those are |
12 |
git & systemd. They don't actually require any pager being installed; |
13 |
however, if $PAGER is set they use it. |
14 |
|
15 |
As the reporter shows, after unmerging virtual/pager and last pager |
16 |
provider, the system is left with an invalid $PAGER setting. Thanks to |
17 |
that, both systemd & git fail with errors. This can be easily |
18 |
reproduced by typing (in a git repo): |
19 |
|
20 |
$ PAGER=foo git log |
21 |
error: cannot run foo: No such file or directory |
22 |
|
23 |
In other words, removing a pager leaves system in a broken state. |
24 |
AFAICS, 'eselect pager' doesn't even support a system without pager -- |
25 |
it just fails miserably. So the user is either forced to install any |
26 |
pager provider, or remove the env.d file by hand. |
27 |
|
28 |
Thus, I raise the following issues: |
29 |
|
30 |
1) eselect modules should probably support not only switching |
31 |
implementations but disabling any as well. I'll open a bug for |
32 |
the editor module used here; |
33 |
|
34 |
2) should all implementation providers call 'eselect ... update' in |
35 |
postrm()? That seems to be the most reasonable way of ensuring |
36 |
the system is left in working state. |
37 |
|
38 |
3) how about semi-official eselect modules, like eselect-sh? I don't |
39 |
really see all shells depending on it; should the ebuilds check whether |
40 |
a particular eselect module is installed first? |
41 |
|
42 |
[1]:https://bugs.gentoo.org/show_bug.cgi?id=418127 |
43 |
|
44 |
-- |
45 |
Best regards, |
46 |
Michał Górny |