From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id cPNdG0VITWMs4wAAbAwnHQ (envelope-from ) for ; Mon, 17 Oct 2022 14:19:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id kLhfG0VITWNYKAEA9RJhRA (envelope-from ) for ; Mon, 17 Oct 2022 14:19:17 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2CEFA5AC8 for ; Mon, 17 Oct 2022 14:19:17 +0200 (CEST) Received: from localhost ([::1]:36184 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1okP5Q-00086o-9m for larch@yhetil.org; Mon, 17 Oct 2022 08:19:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58104) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okP5C-00084L-HW for guix-patches@gnu.org; Mon, 17 Oct 2022 08:19:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48608) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1okP5C-0006Qh-9M for guix-patches@gnu.org; Mon, 17 Oct 2022 08:19:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1okP5C-0006l5-3x for guix-patches@gnu.org; Mon, 17 Oct 2022 08:19:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58583] [PATCH 1/1] scripts: package: Forbid installation of the guix package. References: <20221017121642.15468-1-paren@disroot.org> In-Reply-To: <20221017121642.15468-1-paren@disroot.org> Resent-From: "(" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 17 Oct 2022 12:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58583 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58583@debbugs.gnu.org Cc: "\(" Received: via spool by 58583-submit@debbugs.gnu.org id=B58583.166600911825946 (code B ref 58583); Mon, 17 Oct 2022 12:19:02 +0000 Received: (at 58583) by debbugs.gnu.org; 17 Oct 2022 12:18:38 +0000 Received: from localhost ([127.0.0.1]:47686 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okP4n-0006kO-N3 for submit@debbugs.gnu.org; Mon, 17 Oct 2022 08:18:37 -0400 Received: from knopi.disroot.org ([178.21.23.139]:44206) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okP4l-0006kG-AH for 58583@debbugs.gnu.org; Mon, 17 Oct 2022 08:18:36 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id A717A4DBCA; Mon, 17 Oct 2022 14:18:34 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with UTF8SMTP id JNmYG4ehTqLn; Mon, 17 Oct 2022 14:18:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1666009109; bh=ldZRAsN52bPmbU+2AoJEBuutUJRlSFOLGBm8KA+YX5Y=; h=From:To:Cc:Subject:Date; b=bcFc5q4S5JmkDfZRmGtCy9eaHMZr5cw/xvXr5Xs6oukIHfh2PR5ISm8EES/nOOVwt ZD6uMdnsFLZCa3E0ZtBsFujxLM195eymVahilKp5c1VkDh1nZjTSCJ5BE6C1BozhjR dIFcsOTyMejfU8ADMe4ULIUpSU6HEPcYWPEUz3YjjwBK990QbB+VErHsU6vea4XY3b J5fJc9xAYOGIWVsRkvxwernmvzRZlcfKFQ4D9xAh5dS/PG7D0UfUhrub0zinBWljNd nGt0Xv0H3I2LPTx3sxEkTQ67Y61U7V2uoM6huC++AAf1MgW9loy+lxkdDjyxeTVUP9 Xxq0ye41xtOQQ== Date: Mon, 17 Oct 2022 13:18:27 +0100 Message-Id: <20221017121827.15571-1-paren@disroot.org> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: "\(" X-ACL-Warn: , "\( via Guix-patches" From: "\( via Guix-patches" via X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1666009157; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=rvk+fE3uNCvZ5Tc7GeH2soNd7Q+6sxei4UgOn3x3Hic=; b=eq0S7jtuMSKH+3cblb2zV+Vp2GjxWdMQDd+1prScpfJn5GKDPYN3YF/PwHdb8hdm+XrIdo KdC4WldtlSmJvlCAaWbNVe13DZVtD9vNLh6ClNaIFtmqCuPlnUHiVUoI+0JGZP4PGEqEQS shN3VS9mC4nl62neUInr8NsYrY678rHlDd3R7M31UzoPVFpgU0Z812GYtH+3WTmHIsq/nb FesAdbLB/VpxvPc/HbRRNwmSZNziBYCoQmoC+R1UxVdsFOZBnn+0s8f956GVxvwFvxAnjK 3XKCrdKHUTzfyQ5yiOK4+vOeh/l5v1dwoR3gGvjBgb3ScFjAZf2CqKRiABHEqw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666009157; a=rsa-sha256; cv=none; b=u9p3EXsIG4bMkCobSO61iRI6+INzki1wYSik1bA5q3yLfy78N9XiTF9WGSats/51JJfS22 aSL8RG12BOJaxchNiPAL9YJ6x2VWo1230m37sfYidNf8nG5Vq+eteWWZ9ZqiRR5i8k/ph8 b0/ltjncFT3Hv7I0HA+hn484w5sM8lSMuGfZxIPRCSeT1OT7mDzOQHtKkcArJYpCw5MIKn Z9Yoz3ywtIuRf6YlNI1g8w+Jm1QYWJw6GvK2Dpp0r0r2z5gwn2cspQkLOqzjf7jZdf/PtK 9cM0u6n6vKMzEE28+i0lqEhkXYhmXCTk14eVfMUGgijo8YVjAY9v8rf2i+7w0Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=bcFc5q4S; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.42 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=bcFc5q4S; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 2CEFA5AC8 X-Spam-Score: -2.42 X-Migadu-Scanner: scn1.migadu.com X-TUID: 9FVEX62nmFpg * 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..886415f41e 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -699,7 +699,15 @@ (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")) + (newline (current-error-port)) + (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