dev-lang/rust: fix bash completion location
authorGerion Entrup <gerion.entrup@flump.de>
Thu, 5 Dec 2019 14:42:14 +0000 (15:42 +0100)
committerGeorgy Yakovlev <gyakovlev@gentoo.org>
Thu, 12 Dec 2019 00:36:42 +0000 (16:36 -0800)
Bug: https://bugs.gentoo.org/689562
Bug: https://bugs.gentoo.org/689160
Package-Manager: Portage-2.3.79, Repoman-2.3.16
Signed-off-by: Gerion Entrup <gerion.entrup@flump.de>
Closes: https://github.com/gentoo/gentoo/pull/13884
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
dev-lang/rust/rust-1.39.0.ebuild

index 8a80a66450bd495c21f88eaf1f99f966e0c6aa3f..f918098e20cf1245ac92b2e8112dd12413c1b29d 100644 (file)
@@ -5,7 +5,7 @@ EAPI=7
 
 PYTHON_COMPAT=( python2_7 python3_{5,6,7} pypy )
 
-inherit check-reqs estack flag-o-matic llvm multiprocessing multilib-build python-any-r1 rust-toolchain toolchain-funcs
+inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing multilib-build python-any-r1 rust-toolchain toolchain-funcs
 
 if [[ ${PV} = *beta* ]]; then
        betaver=${PV//*beta}
@@ -234,6 +234,11 @@ src_install() {
        env DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml \
        --exclude src/tools/miri || die
 
+       # bug #689562, #689160
+       rm "${D}/etc/bash_completion.d/cargo" || die
+       rmdir -p "${D}/etc" || die
+       dobashcomp build/tmp/dist/cargo-image/etc/bash_completion.d/cargo
+
        mv "${ED}/usr/bin/rustc" "${ED}/usr/bin/rustc-${PV}" || die
        mv "${ED}/usr/bin/rustdoc" "${ED}/usr/bin/rustdoc-${PV}" || die
        mv "${ED}/usr/bin/rust-gdb" "${ED}/usr/bin/rust-gdb-${PV}" || die