Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] bash-completion-2.1-r1 once again
Date: Tue, 26 Aug 2014 21:35:30
Message-Id: 20140826233516.510f5ee2@pomiot.lan
In Reply to: [gentoo-dev] bash-completion-2.1-r1 once again by "Michał Górny"
1 Dnia 2014-08-26, o godz. 12:51:22
2 Michał Górny <mgorny@g.o> napisał(a):
3
4 > I think the best way forward is to:
5 >
6 > 1. Teach 'old' eselect-bashcomp to find files in the new $completionsdir
7 > as well as the old location, and stabilize that soon.
8 >
9 > 2. Switch the eclass and ebuilds to use the new $completionsdir. While
10 > at it, make sure that ebuilds install completion files whose names
11 > conform to the new layout (portage QA check likely).
12 >
13 > 3. Do we need some specific documentation except for a regular news
14 > item? Where?
15 >
16 > 4. Unmask the new bash-completion and eselect-bashcomp. Add a news item
17 > explaining the sudden change :).
18
19 A bit more details to the plan:
20
21
22 1. Bump app-admin/eselect-bashcomp (or app-shells/bash-completion)
23 to install env.d file with ES_BASHCOMP_DIRS pointing to the new
24 $completionsdir.
25
26 It seems that ES_BASHCOMP_DIRS variable wasn't actually ever used but
27 it was in the eselect module all the time. While this doesn't change
28 anything at the moment, it will allow the completions to be moved to
29 the new location without having to switch directly to the new scheme.
30 This is mostly intended to help keep stable working.
31
32
33 2. Change bash-completion-r1.eclass default to /completions subdir.
34
35 While this may sound harsh, it doesn't really change anything to
36 existing users. Wherever bash-completion is installed, the eclass uses
37 pkg-config to determine the paths and therefore it will keep using
38 the old paths on those systems. However, new installs (and people not
39 having bash-completion installed) will start moving to the new path.
40
41 For existing users, the files will be installed in the same location to
42 keep symlinks working. This way, they won't have to re-enable
43 completions due to file moves. And once they switch to the new scheme,
44 they will be able to move files via a single rebuild and they won't
45 need working symlinks in compatdir anymore :).
46
47 For new users, the files will already start being installed in the new
48 location. If they decide to enable bash-completion before the new
49 scheme goes live, the updated eselect will be able to find files
50 in the new location. If they do it post-switch, they will have
51 the files in correct location anyway.
52
53
54 3. Bump app-shells/bash-completion to respect current $completionsdir.
55
56 Use a trick similar to the one used for udevdir in sys-apps/systemd.
57 Instead of using a default install path, query pkg-config
58 for the current one and reuse it. That is, until we switch to the new
59 scheme.
60
61 The goal here is similar. Existing users will get bash-completion
62 installed wherever it were, and new users will get it installed to
63 the new location (but without the new logic). This way, installing
64 bash-completion on new systems won't result in moving files back to
65 the old location.
66
67
68 4. Start playing with the new scheme :).
69
70 Once all safety and compatibility logic is in place, I believe I can
71 commit the first testing version of new bash-completion p.masked.
72
73
74 I think I'm going to start committing this tomorrow.
75
76 --
77 Best regards,
78 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] bash-completion-2.1-r1 once again "Michał Górny" <mgorny@g.o>