Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 476992

Summary: app-admin/eselect-bashcomp: Provide a way to make specific completions hidden from the bash-completion autoloader when using upstream bash-completion scheme
Product: Gentoo Hosted Projects Reporter: Samuli Suominen (RETIRED) <ssuominen>
Component: eselectAssignee: Gentoo eselect Team <eselect>
Status: RESOLVED DUPLICATE    
Severity: normal CC: mgorny, shell-tools
Priority: Normal Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 521146    
Attachments: Initial attempt at new bashcomp module
Patch to /usr/share/bash-completion/bash_completion
Updated /usr/share/bash-completion/bash_completion patch
eselect module w/ user switching support

Description Samuli Suominen (RETIRED) gentoo-dev 2013-07-16 00:28:31 UTC
These are unrequired and shouldn't be installed anymore with app-admin/eselect wrt bug 472938

>=app-shells/bash-completion-2.1-r1 will install, and use everything by default with possibility of opt-out by upstream methods of, for example, "complete -r udisksctl" in ~/.bashrc would stop udisksctl from completion

However if you want to keep on supporting somekind of bashcomp eselect module, that'd be fine by me too

null ssuominen # qfile -b bashcomp-config
app-admin/eselect (/usr/bin/bashcomp-config)
null ssuominen # qfile -b bashcomp.eselect
app-admin/eselect (/usr/share/eselect/modules/bashcomp.eselect)
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2013-07-16 00:54:11 UTC
The only use for eselect module would be simple on/off switch like,

'enable' setting -> source /usr/share/bash-completion/bash_completion
'disable' setting -> don't source /usr/share/bash-completion/bash_completion

I'll revision bump eselect tomorrow'ish and punt the files unless someone handles this first (like the real maintainers of eselect :-)

Thanks!
Comment 2 Ulrich Müller gentoo-dev 2013-07-16 07:29:21 UTC
Already done a month ago, in the "bashcomp" branch:
http://git.overlays.gentoo.org/gitweb/?p=proj/eselect.git;a=shortlog;h=refs/heads/bashcomp

Please review.
Comment 3 Ulrich Müller gentoo-dev 2013-07-16 07:51:00 UTC
And please review if eselect's method to install eselect.bashcomp is still correct with the new bash-completion:

    newbashcomp misc/eselect.bashcomp eselect
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2013-07-16 13:06:37 UTC
(In reply to Ulrich Müller from comment #2)
> Already done a month ago, in the "bashcomp" branch:
> http://git.overlays.gentoo.org/gitweb/?p=proj/eselect.git;a=shortlog;h=refs/
> heads/bashcomp
> 
> Please review.

(In reply to Ulrich Müller from comment #3)
> And please review if eselect's method to install eselect.bashcomp is still
> correct with the new bash-completion:
> 
>     newbashcomp misc/eselect.bashcomp eselect

both looks correct to me

/usr/share/bash-completion/completions is used as a default. as in, when there is no installed version of bash-completion at all yet, or when the new version >= 2.1-r1 is installed (by eclass)

$ qfile -b -v eselect
app-admin/eselect-1.3.6 (/usr/share/bash-completion/completions/eselect)
Comment 5 Ulrich Müller gentoo-dev 2013-07-16 14:36:51 UTC
Rebased and merged to master:
http://git.overlays.gentoo.org/gitweb/?p=proj/eselect.git;a=commit;h=2ea27fd3794db4758c2f76117f34d6205652ce2b

This doesn't imply that I like the direction this is going: You're replacing useful and well-tested functionality by something that is much more primitive.
Comment 6 Ulrich Müller gentoo-dev 2013-07-16 16:07:35 UTC
Fixed in eselect-1.3.7.
Comment 7 Ulrich Müller gentoo-dev 2014-06-10 13:22:48 UTC
All versions of app-shells/bash-completion depend on the eselect module again.

Should I undo deletion of bashcomp.eselect in the eselect git repo?
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-08-24 08:54:17 UTC
Created attachment 383496 [details]
Initial attempt at new bashcomp module

It uses /etc/bash/completions.blacklist file to disable completions. Patch to autoloader will follow.

We may also want to extend this to support per-user blacklists. However, I think that we should default to '--global' when run by root.
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-08-24 08:57:51 UTC
Created attachment 383498 [details, diff]
Patch to /usr/share/bash-completion/bash_completion
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-08-24 11:20:27 UTC
Created attachment 383506 [details, diff]
Updated /usr/share/bash-completion/bash_completion patch

This one is updated to support per-user switching.
Comment 11 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-08-24 11:21:05 UTC
Created attachment 383508 [details]
eselect module w/ user switching support
Comment 12 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-08-28 10:02:05 UTC
I'm handling this as part of the revbump :).

*** This bug has been marked as a duplicate of bug 472938 ***