Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 525808 - app-emulation/lxc-1.0.4 installs into /etc/bash_completion.d/
Summary: app-emulation/lxc-1.0.4 installs into /etc/bash_completion.d/
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Diego Elio Pettenò (RETIRED)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2014-10-18 19:50 UTC by i.Dark_Templar
Modified: 2014-11-05 07:38 UTC (History)
5 users (show)

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


Attachments
lxc-bashcomp.patch (lxc-bashcomp.patch,674 bytes, patch)
2014-10-18 19:52 UTC, i.Dark_Templar
Details | Diff
lxc-1.0.4.ebuild (lxc-1.0.4.ebuild,5.50 KB, text/plain)
2014-10-18 19:53 UTC, i.Dark_Templar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description i.Dark_Templar 2014-10-18 19:50:37 UTC
Bash completion files are installed in /etc/bash_completion.d directory.

Reproducible: Always

Steps to Reproduce:
1. emerge =app-emulation/lxc-1.0.4
Actual Results:  
Bash completion files are installed in /etc/bash_completion.d directory.

Expected Results:  
Bash completion files should be installed in /usr/share/bash-completion directory.
Comment 1 i.Dark_Templar 2014-10-18 19:52:14 UTC
Created attachment 386906 [details, diff]
lxc-bashcomp.patch

Patch to fix bash completion files installation
Comment 2 i.Dark_Templar 2014-10-18 19:53:13 UTC
Created attachment 386908 [details]
lxc-1.0.4.ebuild

modified ebuild applying bashcomp patch

diff:
--- /usr/portage/app-emulation/lxc/lxc-1.0.4.ebuild     2014-06-15 22:29:53.000000000 +0400
+++ /usr/local/portage/app-emulation/lxc/lxc-1.0.4.ebuild       2014-10-18 23:48:54.000000000 +0400
@@ -95,6 +95,8 @@
                echo > "${S}/src/python-${PN}/Makefile.am";
        fi
 
+       epatch ${FILESDIR}/lxc-bashcomp.patch
+
        eautoreconf
 }
Comment 3 Markos Chandras (RETIRED) gentoo-dev 2014-10-19 09:05:28 UTC
Is this something that needs to be fixed upstream as well?
Comment 4 i.Dark_Templar 2014-10-19 12:59:18 UTC
(In reply to Markos Chandras from comment #3)
> Is this something that needs to be fixed upstream as well?

IMHO, no, because 'eselect bashcomp' is a feature specific to gentoo (and most likely gentoo-derived distros). I don't know how bash completion configs are handled in other distros, but I assume it's done differently somehow (if it's done at all). But I seldom use other distros lately.

I've just checked Debian's 'bash-completion' package, and it looks like directory '/usr/share/bash-completion/completions/' is used there, which doesn't look compatible to Gentoo's layout.
Comment 5 Justin Lecher (RETIRED) gentoo-dev 2014-10-30 08:50:19 UTC
+*lxc-1.0.6-r1 (30 Oct 2014)
+
+  30 Oct 2014; Justin Lecher <jlec@gentoo.org> +lxc-1.0.6-r1.ebuild,
+  +files/lxc-1.0.6-bash-completion.patch:
+  Fix installation of bash-completions, #525808; thanks i.Dark_Templar for the
+  initial patch
+
Comment 6 Mark (voidzero) 2014-11-05 00:14:38 UTC
It's a bit strange; with LXC 1.0.6-r1 on one of my x86_64 nodes, the src_install 'mv' command fails.

The command from the ebuild (line 129):

mv "${ED}"/$(get_bashcompdir)/${PN} "${ED}"/$(get_bashcompdir)/${PN}-start || die

To see what this command attempts to do, I've edited the ebuild and added that command, prefixed with echo. The output and result:

mv /var/build/portage/app-emulation/lxc-1.0.6-r0/image///usr/share/bash-completion/lxc /var/build/portage/app-emulation/lxc-1.0.6-r0/image///usr/share/bash-completion/lxc-start

mv: cannot stat ‘/var/build/portage/app-emulation/lxc-1.0.6-r0/image///usr/share/bash-completion/lxc’: No such file or directory

It builds fine on my other systems so I'm not sure about the cause of this. It might be a local issue, but I don't know where to start looking. For now I've added a modified version with -r0 to my local overlay, but if anyone can provide some hints, that would have my preference.
Comment 7 Justin Lecher (RETIRED) gentoo-dev 2014-11-05 07:38:09 UTC
(In reply to Marckus Knight from comment #6)
> It's a bit strange; with LXC 1.0.6-r1 on one of my x86_64 nodes, the
> src_install 'mv' command fails.
> 

Could you please provide the full build.log?