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
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
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
I can also confirm this error.
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
Assigning to Justin who committed the latest revision
Absolutely unreproducible. @mgorny, what could be the problem here?
Confirm on AMD64
(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?
(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.
Thanks for the hint + 09 Nov 2014; Justin Lecher <jlec@gentoo.org> lxc-1.0.6-r1.ebuild: + Fix for old bash-completion, #527520 +
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.