Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 477378 - app-cdr/cdemu does not respect bashcompdir
Summary: app-cdr/cdemu does not respect bashcompdir
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Alexandre Rostovtsev (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 477380 477004
  Show dependency tree
 
Reported: 2013-07-19 11:11 UTC by Michał Górny
Modified: 2013-07-19 14:42 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-07-19 11:11:13 UTC
The package uses constant bashcompdir at /usr/share/bash-completion. However, as of app-shells/bash-completion-2.1-r1 the bashcompdir has changed and this is no longer valid.

Please fix your ebuild to inherit bash-completion-r1 and use its $(get_bashcompdir) function. This will make the ebuild compliant both with the old and the new install location.
Comment 1 Alexandre Rostovtsev (RETIRED) gentoo-dev 2013-07-19 13:28:00 UTC
Fixed, thanks for the explanation.

+*cdemu-2.1.0-r1 (19 Jul 2013)
+
+  19 Jul 2013; Alexandre Rostovtsev <tetromino@gentoo.org>
+  +cdemu-2.1.0-r1.ebuild, +files/cdemu-2.1.0-bash-completion-dir.patch:
+  Do not use a hard-coded completion directory to fix compatibility with
+  bash-completion-2.1-r1 (bug #477378, thanks to Michał Górny).
Comment 2 Alexander Tsoy 2013-07-19 14:04:01 UTC
Completion script is named "cdemu-client", so it will not get loaded by bash-completion-2.1-r1. It should be renamed to "cdemu", or leaved in compatdir (/etc/bash_completion.d).
Comment 3 Alexandre Rostovtsev (RETIRED) gentoo-dev 2013-07-19 14:09:29 UTC
(In reply to Alexander Tsoy from comment #2)
> Completion script is named "cdemu-client", so it will not get loaded by
> bash-completion-2.1-r1. It should be renamed to "cdemu", or leaved in
> compatdir (/etc/bash_completion.d).

Explain please.
Comment 4 Alexandre Rostovtsev (RETIRED) gentoo-dev 2013-07-19 14:13:53 UTC
bash-completion-2.1-r1 itself installs 46 different files with "-" in their filename into /usr/share/bash-completion/completions
Comment 5 Alexander Tsoy 2013-07-19 14:18:11 UTC
(In reply to Alexandre Rostovtsev from comment #3)

From the README:

Q. I author/maintain package X and would like to maintain my own
   completion code for this package. Where should I put it to be sure
   that interactive bash shells will find it and source it?

   Install it in one of the directories pointed to by
   bash-completion's pkgconfig file variables.  There are two
   alternatives: the recommended one is 'completionsdir' (get it with
   "pkg-config --variable=completionsdir bash-completion") from which
   completions are loaded on demand based on invoked commands' names,
   so be sure to name your completion file accordingly, and to include
   for example symbolic links in case the file provides completions
   for more than one command.  The other one which is present for
   backwards compatibility reasons is 'compatdir' (get it with
   "pkg-config --variable=compatdir bash-completion") from which files
   are loaded when bash_completion is loaded.
Comment 6 Alexander Tsoy 2013-07-19 14:22:58 UTC
Also you can look how the finction _completion_loader() is used in /usr/share/bash-completion/bash_completion.
Comment 7 Alexander Tsoy 2013-07-19 14:31:23 UTC
(In reply to Alexandre Rostovtsev from comment #4)
> bash-completion-2.1-r1 itself installs 46 different files with "-" in their
> filename into /usr/share/bash-completion/completions

If completion is installed in completionsdir, then its name must match command name. Symbol "-" is not a problem.
Comment 8 Alexandre Rostovtsev (RETIRED) gentoo-dev 2013-07-19 14:42:00 UTC
Fixed, thanks.

+*cdemu-2.1.0-r2 (19 Jul 2013)
+
+  19 Jul 2013; Alexandre Rostovtsev <tetromino@gentoo.org>
+  +cdemu-2.1.0-r2.ebuild, -cdemu-2.1.0-r1.ebuild,
+  files/cdemu-2.1.0-bash-completion-dir.patch:
+  Fix completion filename for bash-completion-2.1-r1 (bug #477378, thanks to
+  Alexander Tsoy).