Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 527520 - app-emulation/lxc-1.0.6-r1 - mv: cannot stat '.../image///usr/share/bash-completion/lxc': No such file or directory
Summary: app-emulation/lxc-1.0.6-r1 - mv: cannot stat '.../image///usr/share/bash-comp...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Justin Lecher (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-30 21:09 UTC by Alexander Zubkov
Modified: 2014-11-09 16:37 UTC (History)
13 users (show)

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 Alexander Zubkov 2014-10-30 21:09:42 UTC
When emerging app-emulation/lxc-1.0.6-r1, I got a failed build. Because it tries to access non-existent path.

Reproducible: Always

Steps to Reproduce:
emerge =app-emulation/lxc-1.0.6-r1
Actual Results:  
...
make[2]: Leaving directory '/var/tmp/portage/app-emulation/lxc-1.0.6-r1/work/lxc
-lxc-1.0.6'
make[1]: Leaving directory '/var/tmp/portage/app-emulation/lxc-1.0.6-r1/work/lxc
-lxc-1.0.6'
mv: cannot stat '/var/tmp/portage/app-emulation/lxc-1.0.6-r1/image///usr/share/b
ash-completion/lxc': No such file or directory
 * ERROR: app-emulation/lxc-1.0.6-r1::gentoo failed (install phase):
...


Expected Results:  
emerge is successful

I see that real path, which it trying to access, should be this, I think:

-rw-r--r-- 1 root root 2403 Oct 30 21:36 /var/tmp/portage/app-emulation/lxc-1.0.6-r1/image/usr/share/bash-completion/completions/lxc
Comment 1 Joakim Tjernlund 2014-10-31 14:03:59 UTC
me too

I think the the error is in 
	epatch "${FILESDIR}"/${P}-bash-completion.patch
which moves the lxc completion and this results in the error
Comment 2 Tomas Rusnak 2014-11-05 13:33:18 UTC
I can confirm this error:

make[1]: Leaving directory '/var/tmp/portage/app-emulation/lxc-1.0.6-r1/work/lxc-lxc-1.0.6'
mv: cannot stat ‘/var/tmp/portage/app-emulation/lxc-1.0.6-r1/image///usr/share/bash-completion/lxc’: No such file or directory
 ^[[31;01m*^[[0m ERROR: app-emulation/lxc-1.0.6-r1::gentoo failed (install phase):
 ^[[31;01m*^[[0m   (no error message)
 ^[[31;01m*^[[0m
 ^[[31;01m*^[[0m Call stack:
 ^[[31;01m*^[[0m     ebuild.sh, line  93:  Called src_install
 ^[[31;01m*^[[0m   environment, line 5364:  Called die
 ^[[31;01m*^[[0m The specific snippet of code:
 ^[[31;01m*^[[0m       mv "${ED}"/$(get_bashcompdir)/${PN} "${ED}"/$(get_bashcompdir)/${PN}-start || die;
 ^[[31;01m*^[[0m
Comment 3 Ziga Boehm 2014-11-06 18:57:13 UTC
I can also confirm this error.
Comment 4 Tomas Rusnak 2014-11-07 10:30:59 UTC
As a workaround you can apply this patch:

131c131
< 	mv "${ED}"/$(get_bashcompdir)/${PN} "${ED}"/$(get_bashcompdir)/${PN}-start || die
---
> 	mv "${ED}"/$(get_bashcompdir)/completions/${PN} "${ED}"/$(get_bashcompdir)/completions/${PN}-start || die
Comment 5 Markos Chandras (RETIRED) gentoo-dev 2014-11-07 22:25:44 UTC
Assigning to Justin who committed the latest revision
Comment 6 Justin Lecher (RETIRED) gentoo-dev 2014-11-09 12:57:50 UTC
Absolutely unreproducible.

@mgorny, what could be the problem here?
Comment 7 Opportunist 2014-11-09 12:59:51 UTC
Confirm on AMD64
Comment 8 Justin Lecher (RETIRED) gentoo-dev 2014-11-09 13:31:05 UTC
(In reply to Tomas Rusnak from comment #4)
> As a workaround you can apply this patch:
> 
> 131c131
> < 	mv "${ED}"/$(get_bashcompdir)/${PN}
> "${ED}"/$(get_bashcompdir)/${PN}-start || die
> ---
> > 	mv "${ED}"/$(get_bashcompdir)/completions/${PN} "${ED}"/$(get_bashcompdir)/completions/${PN}-start || die

get_bashcompdir should return /usr/share/bashcompletions/completions/


do you have a bash-completions.pc installed?
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-11-09 14:18:21 UTC
(In reply to Justin Lecher from comment #8)
> (In reply to Tomas Rusnak from comment #4)
> > As a workaround you can apply this patch:
> > 
> > 131c131
> > < 	mv "${ED}"/$(get_bashcompdir)/${PN}
> > "${ED}"/$(get_bashcompdir)/${PN}-start || die
> > ---
> > > 	mv "${ED}"/$(get_bashcompdir)/completions/${PN} "${ED}"/$(get_bashcompdir)/completions/${PN}-start || die
> 
> get_bashcompdir should return /usr/share/bashcompletions/completions/

It will return the old path when old version of bash-completion is installed. And anyway, you shouldn't mix hardcoded and eclass-obtained paths. Decide on either.
Comment 10 Justin Lecher (RETIRED) gentoo-dev 2014-11-09 15:28:48 UTC
Thanks for the hint


+  09 Nov 2014; Justin Lecher <jlec@gentoo.org> lxc-1.0.6-r1.ebuild:
+  Fix for old bash-completion, #527520
+
Comment 11 Tomas Rusnak 2014-11-09 16:37:05 UTC
It's reproducible only on app-shells/bash-completion-2.1-r2 and older (amd64) as Michal and Opportunist said.

My solution was only a quick workaround not a real patch. I had no idea what should get_bashcompdir() return in different bash-completion versions.

Thanks for a fix Justin.