Dnia 2014-08-26, o godz. 12:51:22
Michał Górny <mgo...@gentoo.org> napisał(a):

> I think the best way forward is to:
> 
> 1. Teach 'old' eselect-bashcomp to find files in the new $completionsdir
> as well as the old location, and stabilize that soon.
> 
> 2. Switch the eclass and ebuilds to use the new $completionsdir. While
> at it, make sure that ebuilds install completion files whose names
> conform to the new layout (portage QA check likely).
> 
> 3. Do we need some specific documentation except for a regular news
> item? Where?
> 
> 4. Unmask the new bash-completion and eselect-bashcomp. Add a news item
> explaining the sudden change :).

A bit more details to the plan:


1. Bump app-admin/eselect-bashcomp (or app-shells/bash-completion)
to install env.d file with ES_BASHCOMP_DIRS pointing to the new
$completionsdir.

It seems that ES_BASHCOMP_DIRS variable wasn't actually ever used but
it was in the eselect module all the time. While this doesn't change
anything at the moment, it will allow the completions to be moved to
the new location without having to switch directly to the new scheme.
This is mostly intended to help keep stable working.


2. Change bash-completion-r1.eclass default to /completions subdir.

While this may sound harsh, it doesn't really change anything to
existing users. Wherever bash-completion is installed, the eclass uses
pkg-config to determine the paths and therefore it will keep using
the old paths on those systems. However, new installs (and people not
having bash-completion installed) will start moving to the new path.

For existing users, the files will be installed in the same location to
keep symlinks working. This way, they won't have to re-enable
completions due to file moves. And once they switch to the new scheme,
they will be able to move files via a single rebuild and they won't
need working symlinks in compatdir anymore :).

For new users, the files will already start being installed in the new
location. If they decide to enable bash-completion before the new
scheme goes live, the updated eselect will be able to find files
in the new location. If they do it post-switch, they will have
the files in correct location anyway.


3. Bump app-shells/bash-completion to respect current $completionsdir.

Use a trick similar to the one used for udevdir in sys-apps/systemd.
Instead of using a default install path, query pkg-config
for the current one and reuse it. That is, until we switch to the new
scheme.

The goal here is similar. Existing users will get bash-completion
installed wherever it were, and new users will get it installed to
the new location (but without the new logic). This way, installing
bash-completion on new systems won't result in moving files back to
the old location.


4. Start playing with the new scheme :).

Once all safety and compatibility logic is in place, I believe I can
commit the first testing version of new bash-completion p.masked.


I think I'm going to start committing this tomorrow.

-- 
Best regards,
Michał Górny

Attachment: signature.asc
Description: PGP signature

Reply via email to