unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "\( via Guix-patches" via <guix-patches@gnu.org>
To: 58583@debbugs.gnu.org
Cc: "\(" <paren@disroot.org>
Subject: [bug#58583] [PATCH v3] scripts: package: Forbid installation of the guix package.
Date: Mon, 17 Oct 2022 17:50:57 +0100	[thread overview]
Message-ID: <20221017165057.15648-1-paren@disroot.org> (raw)
In-Reply-To: <20221017121642.15468-1-paren@disroot.org>

* guix/scripts/package.scm (package->manifest-entry*): Fail if the
  package to be installed is guix from the default channel.
---
 guix/scripts/package.scm | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 7ba2661bbb..9f023ea7b5 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2018 Steve Sprang <scs@stevesprang.com>
 ;;; Copyright © 2022 Josselin Poiret <dev@jpoiret.xyz>
 ;;; Copyright © 2022 Antero Mejr <antero@mailbox.org>
+;;; Copyright © 2022 ( <paren@disroot.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -699,7 +700,14 @@ (define (store-item->manifest-entry item)
 
 (define (package->manifest-entry* package output)
   "Like 'package->manifest-entry', but attach PACKAGE provenance meta-data to
-the resulting manifest entry."
+the resulting manifest entry, and report an error if PACKAGE is the 'guix'
+package from the default channel."
+  (when (and (string=? (package-name package) "guix")
+             (string-prefix? "gnu/" (location-file
+                                     (package-location package))))
+    (report-error (G_ "the 'guix' package should not be installed~%"))
+    (display-hint (G_ "use 'guix pull' to fetch the latest Guix revision"))
+    (exit 1))
   (manifest-entry-with-provenance
    (package->manifest-entry package output)))
 
-- 
2.38.0





  parent reply	other threads:[~2022-10-17 16:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-17 12:16 [bug#58583] [PATCH 0/1] scripts: package: Forbid installation of the guix package ( via Guix-patches via
2022-10-17 12:18 ` [bug#58583] [PATCH 1/1] " ( via Guix-patches via
2022-10-17 12:22 ` [bug#58583] [PATCH v2] " ( via Guix-patches via
2022-10-17 16:24   ` Tobias Geerinckx-Rice via Guix-patches via
2022-10-17 16:43     ` ( via Guix-patches via
2022-10-17 16:50 ` ( via Guix-patches via [this message]
2022-10-17 18:14   ` [bug#58583] [PATCH v3] " zimoun
2022-10-27 20:04     ` [bug#58583] [PATCH 0/1] " Maxim Cournoyer
2022-10-28  7:44       ` zimoun
2022-10-28 14:31         ` ( via Guix-patches via
2022-10-28 15:47         ` Maxim Cournoyer
2022-10-28 16:20         ` Tobias Geerinckx-Rice via Guix-patches via
2022-10-28 17:01           ` Tobias Geerinckx-Rice via Guix-patches via
2022-11-02 11:47         ` zimoun
2022-11-02 13:19           ` Tobias Geerinckx-Rice via Guix-patches via
2022-11-02 15:48             ` zimoun
2022-11-03 15:03               ` Maxim Cournoyer
2022-11-03 18:32                 ` zimoun
2022-10-27 20:11   ` Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221017165057.15648-1-paren@disroot.org \
    --to=guix-patches@gnu.org \
    --cc=58583@debbugs.gnu.org \
    --cc=paren@disroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).