From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id gA8nISpCyV/+ZQAA0tVLHw (envelope-from ) for ; Thu, 03 Dec 2020 19:53:14 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 0NbrHCpCyV9qdQAAbx9fmQ (envelope-from ) for ; Thu, 03 Dec 2020 19:53:14 +0000 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 1FFE2940AFD for ; Thu, 3 Dec 2020 19:53:13 +0000 (UTC) Received: from localhost ([::1]:50102 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kkufA-0004uB-Sq for larch@yhetil.org; Thu, 03 Dec 2020 14:53:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60676) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kkuf0-0004rP-EO for guix-patches@gnu.org; Thu, 03 Dec 2020 14:53:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:58519) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kkuf0-0002re-4C for guix-patches@gnu.org; Thu, 03 Dec 2020 14:53:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kkuf0-0004rN-1h for guix-patches@gnu.org; Thu, 03 Dec 2020 14:53:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45028] [PATCH] offload: Print warning in context. Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 03 Dec 2020 19:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 45028 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 45028@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.160702518018672 (code B ref -1); Thu, 03 Dec 2020 19:53:01 +0000 Received: (at submit) by debbugs.gnu.org; 3 Dec 2020 19:53:00 +0000 Received: from localhost ([127.0.0.1]:41832 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kkuex-0004r4-U2 for submit@debbugs.gnu.org; Thu, 03 Dec 2020 14:53:00 -0500 Received: from lists.gnu.org ([209.51.188.17]:44028) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kkuew-0004qv-1k for submit@debbugs.gnu.org; Thu, 03 Dec 2020 14:52:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60646) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kkuev-0004mg-PV for guix-patches@gnu.org; Thu, 03 Dec 2020 14:52:57 -0500 Received: from lepiller.eu ([2a00:5884:8208::1]:43298) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kkuet-0002oM-CX for guix-patches@gnu.org; Thu, 03 Dec 2020 14:52:57 -0500 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 7d977993 for ; Thu, 3 Dec 2020 19:52:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:subject:message-id:mime-version:content-type; s=dkim; bh=N4P BwH7rgIX2GGYL241mSCkqv7A6XI53h8uup15+Y2g=; b=nnPycUOxRJJ7VoXfZXO hDy31CJ1z3WaUCKctumpulohaSgI875kMzg93+nsPUoZDDePWgNPlNEo2JL/TrFk nWOcAWFzpLJukPyU/lfZxQxcX1oPgqB/xXXpit8QbPDowZxTDD3lmRqhOG6MCYz8 Sv+rvTK/yU1RFnPgcZ0ZUCA6F+U5CZrfidVmF+C2kPLBawoS5g7fY92aucHbg8KJ shRkOwmP+KPuuB8ERygzIq7BGAAzJHXMIrZO34XSrXmMtr4Vf2PBBjD8aJJRFlZI Wlq7+TafIIzlJmQ+p9s1CGV9EbIohPVgi63qO3AgiYJ+tt2FEqUjnk0T7502I9RM cCA== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 55f520fb (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Thu, 3 Dec 2020 19:52:49 +0000 (UTC) Date: Thu, 3 Dec 2020 20:52:37 +0100 From: Julien Lepiller Message-ID: <20201203205237.3f80576f@tachikoma.lepiller.eu> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/Hn.JlChUd2Za+IE5NzpmK+P" Received-SPF: pass client-ip=2a00:5884:8208::1; envelope-from=julien@lepiller.eu; helo=lepiller.eu 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_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.18 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=lepiller.eu header.s=dkim header.b=nnPycUOx; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lepiller.eu (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 1FFE2940AFD X-Spam-Score: -1.18 X-Migadu-Scanner: ns3122888.ip-94-23-21.eu X-TUID: 9ZPM4IA1wdjD --MP_/Hn.JlChUd2Za+IE5NzpmK+P Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Guix, attached is a patch to add context to the warning about the system field. When offloading, we get this message if we haven't updated our machines.scm: guix offload: warning: The 'system' field is deprecated, please use 'systems' instead. and it's not clear what system field this message is refering to (especially for me, since I simply re-enabled offloading after a few months by copying my old backup machines.scm). Now the message is: /etc/guix/machines.scm:9:6: warning: The 'system' field is deprecated, please use 'systems' instead. which directs the user to the right file, and line (so if you have many offload machines, you know where to fix). Since the message comes from the daemon, you need to run the daemon from your guix checkout to test the patch. --MP_/Hn.JlChUd2Za+IE5NzpmK+P Content-Type: text/x-patch Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=0001-offload-Print-warning-in-context.patch =46rom d29c55f67c63c6fe49a4febd7999640a0dab2a55 Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Thu, 3 Dec 2020 20:22:50 +0100 Subject: [PATCH] offload: Print warning in context. * guix/scripts/offload.scm (build-machine): Add `location` field. (build-machine-system): Print location with warning. --- guix/scripts/offload.scm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm index 6366556647..58ee53e85c 100644 --- a/guix/scripts/offload.scm +++ b/guix/scripts/offload.scm @@ -2,6 +2,7 @@ ;;; Copyright =C2=A9 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Cour= t=C3=A8s ;;; Copyright =C2=A9 2017 Ricardo Wurmus ;;; Copyright =C2=A9 2020 Maxim Cournoyer +;;; Copyright =C2=A9 2020 Julien Lepiller ;;; ;;; This file is part of GNU Guix. ;;; @@ -65,6 +66,7 @@ build-machine-overload-threshold build-machine-systems build-machine-features + build-machine-location =20 build-requirements build-requirements? @@ -112,11 +114,17 @@ (speed build-machine-speed ; inexact real (default 1.0)) (features build-machine-features ; list of strings - (default '()))) + (default '())) + (location build-machine-location + (default (and=3D> (current-source-location) + source-properties->location)) + (innate))) =20 ;;; Deprecated. (define (build-machine-system machine) - (warning (G_ "The 'system' field is deprecated, \ + (warning + (build-machine-location machine) + (G_ "The 'system' field is deprecated, \ please use 'systems' instead.~%")) (%build-machine-system machine)) =20 --=20 2.29.2 --MP_/Hn.JlChUd2Za+IE5NzpmK+P--