Received: (at 75736-done) by debbugs.gnu.org; 27 Jan 2025 13:02:41 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 27 08:02:41 2025 Received: from localhost ([127.0.0.1]:59847 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tcOlE-00071N-Vf for submit <at> debbugs.gnu.org; Mon, 27 Jan 2025 08:02:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41816) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1tcOlD-000719-HG for 75736-done <at> debbugs.gnu.org; Mon, 27 Jan 2025 08:02:39 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1tcOl7-00008v-Mw; Mon, 27 Jan 2025 08:02:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=k0aZcSam2pqGgZsfhIVftUQOr3uvhN/DpzTBxh1taGY=; b=E97VAPj7GwDxw6LlMku1 f+ptsSQKktBS4u4rglhvvwQPAtWt8yVIWXZEnND+Sc7qyE5qf4ObGdycwoN217Dx3z63S/ygw2UfT GZFhNTkVvOTe5QnwI1Oimfvlvaotcd+ZtsRhePD5VybV8p0ma+oOxTlT1VTAwIegFw/XSPGLoJRmU rP832KiTIzMZXFjqLUXpOmlUlUKpnhrrw1Jv2qZL8g+wG1cMOf8oXNyLI6u5FUoXPFpkg+Z4155KH SBJkj/INQvuCT9lJqSVnWVh5PmyzNhPa/4WGT0hmMFJ1PKT058MKfYpsigDLuHs3DEhO7LPaE8WnU hPR+1GCOhZNDGw==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> To: Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN> Subject: Re: bug#75736: [PATCH v1] guix-install.sh: uninstall: also remove shell completion symlinks. In-Reply-To: <fe2dbdd6c5a43647814c8bb8c7dc8905037d5dcc.1737480819.git.GNUtoo@HIDDEN> (Denis Carikli's message of "Tue, 21 Jan 2025 18:33:39 +0100") References: <fe2dbdd6c5a43647814c8bb8c7dc8905037d5dcc.1737480819.git.GNUtoo@HIDDEN> Date: Mon, 27 Jan 2025 14:02:30 +0100 Message-ID: <87sep4o1eh.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 75736-done Cc: 75736-done <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN> skribis: > Since symlinks to shell completion files are installed, it is useful to remove > them during the uninstallation, especially when they point to files that are > removed by 'guix-install.sh --uninstall'. > > * etc/guix-install.sh (sys_delete_shell_completion): Create. > (sys_create_shell_completion): hardcode files being installed. > (sys_customize_bashrc): call sys_delete_shell_completion. > > Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN> > Change-Id: I70008bb55e7e1604f0c485c798460e160af7c9e5 Applied, thanks!
Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN>
:Ludovic Courtès <ludo@HIDDEN>
:Received: (at submit) by debbugs.gnu.org; 21 Jan 2025 17:34:09 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 21 12:34:09 2025 Received: from localhost ([127.0.0.1]:56007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1taI8f-0002MX-4A for submit <at> debbugs.gnu.org; Tue, 21 Jan 2025 12:34:09 -0500 Received: from lists.gnu.org ([2001:470:142::17]:48304) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <GNUtoo@HIDDEN>) id 1taI8c-0002Lw-19 for submit <at> debbugs.gnu.org; Tue, 21 Jan 2025 12:34:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <GNUtoo@HIDDEN>) id 1taI8V-0002tX-3q for guix-patches@HIDDEN; Tue, 21 Jan 2025 12:34:00 -0500 Received: from cyberdimension.org ([2001:678:938:3ff::36] helo=rockpro64.cyberdimension.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from <GNUtoo@HIDDEN>) id 1taI8R-0002Md-Dk for guix-patches@HIDDEN; Tue, 21 Jan 2025 12:33:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=dkim; bh=lJ9H5kUNQ9LqQT7 sKeqAHQG/R8583CHc+IMuM8hnoR4=; h=date:subject:cc:to:from; d=cyberdimension.org; b=kTGJlhGAzdtZpF7n+ULdj/DDAfw8TFZud2xhknhjUVIzJR xnB2jGzA5PjOX7zhi3C1fZjdcWNQUpTMem0wLBlThgfjau5HkY+hOawnU6jsT09Ls/xiB1 peGR/S5IJLGl2z3dC+QX7V6t4GJRKlLT0hS8rfgv1puFTmxGtskJoXpPNoEH/YkuD/RqoS 0hS6iVeI3RfR9O3gIm5+shRb3a5nT1PQYFh031XH0vtuHgun6u8gTQmIugREZEdQ6ycwjh dQmZ4Y0cmF/C8hzTvwo4fFsUrbixwQiVql0zJ+MbFbd7G3LY8tmKfOMj35ZOwtexPnn6pz Nndxif7tvQTg9Kvw== Received: from localhost.localdomain (localhost [127.0.0.1]) by rockpro64.cyberdimension.org (OpenSMTPD) with ESMTP id 4cbc8fcc; Tue, 21 Jan 2025 17:33:51 +0000 (UTC) From: Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN> To: guix-patches@HIDDEN Subject: [PATCH v1] guix-install.sh: uninstall: also remove shell completion symlinks. Date: Tue, 21 Jan 2025 18:33:39 +0100 Message-ID: <fe2dbdd6c5a43647814c8bb8c7dc8905037d5dcc.1737480819.git.GNUtoo@HIDDEN> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2001:678:938:3ff::36; envelope-from=GNUtoo@HIDDEN; helo=rockpro64.cyberdimension.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit Cc: Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.1 (/) Since symlinks to shell completion files are installed, it is useful to remove them during the uninstallation, especially when they point to files that are removed by 'guix-install.sh --uninstall'. * etc/guix-install.sh (sys_delete_shell_completion): Create. (sys_create_shell_completion): hardcode files being installed. (sys_customize_bashrc): call sys_delete_shell_completion. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN> Change-Id: I70008bb55e7e1604f0c485c798460e160af7c9e5 --- etc/guix-install.sh | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/etc/guix-install.sh b/etc/guix-install.sh index f07b2741bb9..22d54c0c832 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -16,6 +16,7 @@ # Copyright © 2024 Janneke Nieuwenhuizen <janneke@HIDDEN> # Copyright © 2024 Tomas Volf <~@wolfsden.cz> # Copyright © 2024 Richard Sent <richard@HIDDEN> +# Copyright © 2025 Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN> # # This file is part of GNU Guix. # @@ -691,12 +692,31 @@ sys_create_shell_completion() [ -d "$dir_shell" ] || mkdir -p $dir_shell done; - ln -sf ${var_guix}/etc/bash_completion.d/* "$bash_completion"; - ln -sf ${var_guix}/share/zsh/site-functions/* "$zsh_completion"; - ln -sf ${var_guix}/share/fish/vendor_completions.d/* "$fish_completion"; } && + # Don't use globing here as we also need to delete the files when + # uninstalling Guix + ln -sf ${var_guix}/etc/bash_completion.d/guix "$bash_completion"; + ln -sf ${var_guix}/etc/bash_completion.d/guix-daemon "$bash_completion"; + ln -sf ${var_guix}/share/zsh/site-functions/_guix "$zsh_completion"; + ln -sf ${var_guix}/share/fish/vendor_completions.d/guix.fish "$fish_completion"; } && _msg "${PAS}installed shell completion" } +sys_delete_shell_completion() +{ # Symlink supported shell completions system-wide + + var_guix=/var/guix/profiles/per-user/root/current-guix + bash_completion=/etc/bash_completion.d + zsh_completion=/usr/share/zsh/site-functions + fish_completion=/usr/share/fish/vendor_completions.d + + _msg "${INF}removing shell completion" + + rm -f "$bash_completion"/guix; + rm -f "$bash_completion"/guix-daemon; + rm -f "$zsh_completion"/_guix; + rm -f "$fish_completion"/guix.fish; +} + sys_customize_bashrc() { prompt_yes_no "Customize users Bash shell prompt for Guix?" || return 0 @@ -884,6 +904,7 @@ main_uninstall() # clean up the system sys_delete_init_profile sys_delete_build_user + sys_delete_shell_completion # these directories are created on the fly during usage. _msg "${INF}removing /etc/guix" base-commit: ae217b7159ee202229eab39cd49adb9254cd4a96 -- 2.46.0
Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN>
:guix-patches@HIDDEN
.
Full text available.guix-patches@HIDDEN
:bug#75736
; Package guix-patches
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.