Gentoo Archives: gentoo-dev

From: Ian Stakenvicius <axs@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Should packages auto-eselect alternative implementation on removal?
Date: Wed, 30 May 2012 17:18:36
Message-Id: 4FC65641.6030902@gentoo.org
In Reply to: [gentoo-dev] Should packages auto-eselect alternative implementation on removal? by "Michał Górny"
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA256
3
4 On 30/05/12 01:01 PM, Michał Górny wrote:
5 > ... In other words, removing a pager leaves system in a broken
6 > state. AFAICS, 'eselect pager' doesn't even support a system
7 > without pager -- it just fails miserably. So the user is either
8 > forced to install any pager provider, or remove the env.d file by
9 > hand.
10 >
11 > Thus, I raise the following issues:
12 >
13 > 1) eselect modules should probably support not only switching
14 > implementations but disabling any as well. I'll open a bug for the
15 > editor module used here;
16 >
17
18 Also, it may make sense to have the eselect module have its own update
19 default -- ie, either unset when the current selection disappears, or
20 choose an alternative (and could even have a default heuristic choice
21 for how that alternative will be chosen). I suppose dev's might want
22 to control this per-package, but I expect that per-eselect-module
23 would be atomic enough to cover the vast majority of cases wouldn't it?
24
25
26 > 2) should all implementation providers call 'eselect ... update'
27 > in postrm()? That seems to be the most reasonable way of ensuring
28 > the system is left in working state.
29
30 I concur on this.
31
32
33 > 3) how about semi-official eselect modules, like eselect-sh? I
34 > don't really see all shells depending on it; should the ebuilds
35 > check whether a particular eselect module is installed first?
36
37
38 This could be done fairly easily via an inherited eclass + an
39 eselect-module-identifier variable (as with the rest of the
40 potentially required functionality above). If it's still up to the
41 package to RDEPEND on the eselect-module package directly, then the
42 eclass could fairly easily do nothing if it's not installed; otherwise
43 a variable to set required or optional would do the same (allowing
44 *DEPEND on the eselect modules could be moved to the eclass)
45
46 -----BEGIN PGP SIGNATURE-----
47 Version: GnuPG v2.0.17 (GNU/Linux)
48
49 iF4EAREIAAYFAk/GVkEACgkQ2ugaI38ACPAubwD9G0MA+2txBUXBI8lzAZu4ULzj
50 rkXcgNgP6FekLHMiKEEBAJNxNd5s/IoN9B00+CrpNn+SEWLalLVPMu3lzmg2zVTM
51 =ZH3A
52 -----END PGP SIGNATURE-----