From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 98CA3158088 for ; Fri, 22 Oct 2021 08:39:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E4BB8E0895; Fri, 22 Oct 2021 08:39:19 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C76A6E0895 for ; Fri, 22 Oct 2021 08:39:19 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DC427343598 for ; Fri, 22 Oct 2021 08:39:18 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8CA8C168 for ; Fri, 22 Oct 2021 08:39:17 +0000 (UTC) From: "Joonas Niilola" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Joonas Niilola" Message-ID: <1634891951.bc9d9ec1d7cc6584b61762649259265f37b56885.juippis@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/lxc/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-emulation/lxc/lxc-4.0.11.ebuild X-VCS-Directories: app-emulation/lxc/ X-VCS-Committer: juippis X-VCS-Committer-Name: Joonas Niilola X-VCS-Revision: bc9d9ec1d7cc6584b61762649259265f37b56885 X-VCS-Branch: master Date: Fri, 22 Oct 2021 08:39:17 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: b8af332e-409d-46db-9b49-e9c2396aef3f X-Archives-Hash: 2cfb963fc3494e75a37504cbdf6943bb commit: bc9d9ec1d7cc6584b61762649259265f37b56885 Author: Joonas Niilola gentoo org> AuthorDate: Fri Oct 22 07:45:08 2021 +0000 Commit: Joonas Niilola gentoo org> CommitDate: Fri Oct 22 08:39:11 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc9d9ec1 app-emulation/lxc: rework bash-completion logic in 4.0.11 - since it collides with lxd's bash-completion file. Signed-off-by: Joonas Niilola gentoo.org> app-emulation/lxc/lxc-4.0.11.ebuild | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/app-emulation/lxc/lxc-4.0.11.ebuild b/app-emulation/lxc/lxc-4.0.11.ebuild index 4af531d3e74..65cb5e5ee84 100644 --- a/app-emulation/lxc/lxc-4.0.11.ebuild +++ b/app-emulation/lxc/lxc-4.0.11.ebuild @@ -134,9 +134,16 @@ src_configure() { src_install() { default - mkdir -p "${ED}"/$(get_bashcompdir) || die - mv "${ED}"/etc/bash_completion.d/* "${ED}"/$(get_bashcompdir)/ || die - rmdir "${ED}"/etc/bash_completion.d/ || die + # The main bash-completion file will collide with lxd, need to relocate and update symlinks. + mkdir -p "${ED}"/$(get_bashcompdir) || die "Failed to create bashcompdir." + mv "${ED}"/etc/bash_completion.d/lxc "${ED}"/$(get_bashcompdir)/lxc-start || die "Failed to relocate lxc bash-completion file." + rm -r "${ED}"/etc/bash_completion.d || die "Failed to remove wrong bash_completion.d content." + + if use tools; then + bashcomp_alias lxc-start lxc-{attach,cgroup,copy,console,create,destroy,device,execute,freeze,info,monitor,snapshot,stop,unfreeze,wait} + else + bashcomp_alias lxc-start lxc-usernsexec + fi keepdir /etc/lxc /var/lib/lxc/rootfs /var/log/lxc rmdir "${D}"/var/cache/lxc "${D}"/var/cache || die "rmdir failed"