X-Loop: help-debbugs@HIDDEN Subject: [bug#75736] [PATCH v1] guix-install.sh: uninstall: also remove shell completion symlinks. Resent-From: Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Tue, 21 Jan 2025 17:35:02 +0000 Resent-Message-ID: <handler.75736.B.17374808499090 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 75736 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75736 <at> debbugs.gnu.org Cc: Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN> X-Debbugs-Original-To: guix-patches@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.17374808499090 (code B ref -1); Tue, 21 Jan 2025 17:35:02 +0000 Received: (at submit) by debbugs.gnu.org; 21 Jan 2025 17:34:09 +0000 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> 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-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
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN> Subject: bug#75736: Acknowledgement ([PATCH v1] guix-install.sh: uninstall: also remove shell completion symlinks.) Message-ID: <handler.75736.B.17374808499090.ack <at> debbugs.gnu.org> References: <fe2dbdd6c5a43647814c8bb8c7dc8905037d5dcc.1737480819.git.GNUtoo@HIDDEN> X-Gnu-PR-Message: ack 75736 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 75736 <at> debbugs.gnu.org Date: Tue, 21 Jan 2025 17:35:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): guix-patches@HIDDEN If you wish to submit further information on this problem, please send it to 75736 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 75736: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D75736 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Subject: bug#75736: closed ([PATCH v1] guix-install.sh: uninstall: also remove shell completion symlinks.) CC: tracker <at> debbugs.gnu.org Message-ID: <handler.75736.D75736.173798296126998.ackdone <at> debbugs.gnu.org> References: <87sep4o1eh.fsf@HIDDEN> <fe2dbdd6c5a43647814c8bb8c7dc8905037d5dcc.1737480819.git.GNUtoo@HIDDEN> X-Gnu-PR-Message: closed 75736 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Date: Mon, 27 Jan 2025 13:03:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1737982982-27041-0" This is a multi-part message in MIME format... ------------=_1737982982-27041-0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Your message dated Mon, 27 Jan 2025 14:02:30 +0100 with message-id <87sep4o1eh.fsf@HIDDEN> and subject line Re: bug#75736: [PATCH v1] guix-install.sh: uninstall: also= remove shell completion symlinks. has caused the debbugs.gnu.org bug report #75736, regarding [PATCH v1] guix-install.sh: uninstall: also remove shell completi= on symlinks. to be marked as done. (If you believe you have received this mail in error, please contact help-debbugs@HIDDEN) --=20 75736: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D75736 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems ------------=_1737982982-27041-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 21 Jan 2025 17:34:09 +0000 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 ------------=_1737982982-27041-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 75736-done) by debbugs.gnu.org; 27 Jan 2025 13:02:41 +0000 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! ------------=_1737982982-27041-0--
MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN> Subject: bug#75736: closed (Re: bug#75736: [PATCH v1] guix-install.sh: uninstall: also remove shell completion symlinks.) Message-ID: <handler.75736.D75736.173798296126998.notifdone <at> debbugs.gnu.org> References: <87sep4o1eh.fsf@HIDDEN> <fe2dbdd6c5a43647814c8bb8c7dc8905037d5dcc.1737480819.git.GNUtoo@HIDDEN> X-Gnu-PR-Message: they-closed 75736 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 75736 <at> debbugs.gnu.org Date: Mon, 27 Jan 2025 13:03:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1737982982-27041-1" This is a multi-part message in MIME format... ------------=_1737982982-27041-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #75736: [PATCH v1] guix-install.sh: uninstall: also remove shell completion= symlinks. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 75736 <at> debbugs.gnu.org. --=20 75736: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D75736 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems ------------=_1737982982-27041-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 75736-done) by debbugs.gnu.org; 27 Jan 2025 13:02:41 +0000 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! ------------=_1737982982-27041-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 21 Jan 2025 17:34:09 +0000 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 ------------=_1737982982-27041-1--
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.