From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 8K46ISjk+GS2MQAA9RJhRA:P1 (envelope-from ) for ; Wed, 06 Sep 2023 22:42:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 8K46ISjk+GS2MQAA9RJhRA (envelope-from ) for ; Wed, 06 Sep 2023 22:42:16 +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 34BC25B104 for ; Wed, 6 Sep 2023 22:42:16 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=QIkaaI03; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1694032936; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-to: 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=347Jr/XXtceLMIvirq0gSkYF/jIOj2Q+bkQWKR06hB8=; b=quKr133SNRAID5BUuC56MLpH8FDdTKpaqhGavuP6Tv+m8rIF/wPabZTucTnIYf6fi3vLh8 Z6jcCV3qZne9Ss+QKdpbmfHGKczXo5UGJfzozENvgaVveWYSNsJP/2qxDpmNmfnupCKebR 3WTOsSahzQHmMAsLXDrVBvbnv6ctcZD2ebHg0Q/beWTs/FF+tL57MV1+y2Qhas+cbYzO+9 p9laTCZRZXXLR09oNAexwOJPuFAkbeZqs4/uH71coNVBmznXlgEylQfzkaezGuftzEbiHY b8AWdZeyreVBYQPU55ZL1I60lAsq7IZBHnSwL1Hs/tCE3LEgZlpG9KsCPJ9CWA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1694032936; a=rsa-sha256; cv=none; b=W/gS1yzFOO9Yo1jDBFfnoUPhqObQLalyLS5ajs8ZrQZ9cSBxhNNfYuD1NCh/anWCDnBVQ8 3Sa4YbAjTOmEQMkJcXH032ddld3wz1ZvdCAp3sG6ULTG0Y4RBMT/aZXN6HdEqtC7CDKPdF C8n/OgBX1IUSp/Lo8gwyJwWqZmWeQmLhtkiGGiIcYftSDVKesiufmjmKl7WCLz96w1RQN9 e7zy1VjDWf/iBkz6OU6O6iQR5pe6R9swul8mIS3UHs6/gqQ3Ow3M350oTF27bRkcIlDoeD RVuuZkRiq74041j7OYq2KqmIgpP4FQnIBpdisWJGIqwNUmlvEd2KyesqaLjwUw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=QIkaaI03; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qdzLg-0005Ka-2V; Wed, 06 Sep 2023 16:42:04 -0400 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 ) id 1qdzLe-0005K2-1C for guix-patches@gnu.org; Wed, 06 Sep 2023 16:42:02 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdzLd-0002p6-PT for guix-patches@gnu.org; Wed, 06 Sep 2023 16:42:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qdzLe-0007KE-NA for guix-patches@gnu.org; Wed, 06 Sep 2023 16:42:02 -0400 Subject: bug#65757: [PATCH] guix: packages: Support package/inherit by package-field-location. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Wed, 06 Sep 2023 20:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 65757 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Simon Tournier Cc: 65757-done@debbugs.gnu.org Mail-Followup-To: 65757@debbugs.gnu.org, maxim.cournoyer@gmail.com, zimon.toutoune@gmail.com Received: via spool by 65757-done@debbugs.gnu.org id=D65757.169403290628133 (code D ref 65757); Wed, 06 Sep 2023 20:42:02 +0000 Received: (at 65757-done) by debbugs.gnu.org; 6 Sep 2023 20:41:46 +0000 Received: from localhost ([127.0.0.1]:37975 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdzLO-0007Jg-8i for submit@debbugs.gnu.org; Wed, 06 Sep 2023 16:41:46 -0400 Received: from mail-qt1-x82d.google.com ([2607:f8b0:4864:20::82d]:45337) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdzLI-0007JK-OC for 65757-done@debbugs.gnu.org; Wed, 06 Sep 2023 16:41:44 -0400 Received: by mail-qt1-x82d.google.com with SMTP id d75a77b69052e-413636c6d6aso1714571cf.3 for <65757-done@debbugs.gnu.org>; Wed, 06 Sep 2023 13:41:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694032893; x=1694637693; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=347Jr/XXtceLMIvirq0gSkYF/jIOj2Q+bkQWKR06hB8=; b=QIkaaI03tm1H/kMOpiFWQVapuO+j7/Ty6+Rx/dAYZvTfuVPBj2JGAu4zrN4xAYpd2p vuTHMhA5VtP+RFB0Y/pCx9fgvLl6JKFXdxQu8KOwE3DPcSg8d6Pw8eoBPOz/7NsymdaG yJGqf/pRjDTkbmEE0wQCqgZ8rgzvhsNDUDmwCvl+CzGBVcCFbiqDyv9ZJ/FhTR75L6zm fxn+qibO6ndcRv9zbzN8++PNvwmEe3T/tv2puRzP0hWZmfJ3a3yNgjbpZih6viWyKFo9 9EHGtgwBrv6ez1wSLGJda1dQ82RWZkLsSagQxZ9uB3oU+9DPN/zQt/JE/y1ozFUEvVOU AGmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694032893; x=1694637693; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=347Jr/XXtceLMIvirq0gSkYF/jIOj2Q+bkQWKR06hB8=; b=fS7sYE7J8uEwHRwL+LaN3uxqRPEbRuNwLVlDI/3NxCTVAF5OdRTRzaS5yIu2StZRxw CL6Txkt5qZIh0MereScj6hPR8wJu5QZagy8uXvIwYrZGdE4i05VDhvn+F4SQVL+U2egv lUMkQLF4hm/r4K5wd/vW8QUseLZ1xgb/YE77sWhRBm0l6ui7PNz0q8GL83XRGmsjvoxx cZaXvDJLXbzwA0IN9g8+C7mBdxx1LKnsDyOLjtflCGmB5v32dVLHSDY7qQyyxV8Klcde AgOVk8truJt8Ngj2mzrMeDwB763vNN35bLh94kqrFwCTXSRteI3R1UftnwMUd8OPKTR+ 1NPw== X-Gm-Message-State: AOJu0YyNV8Kk+iZGECsGUzBsRfZu51RCVPdbv3tZxWvZ97XaKuN/Gi65 pIPxhz8Cwu6ZRQPr15DZSJOO+6cxJ2cd0A== X-Google-Smtp-Source: AGHT+IEVnIBUTJ5SEG8T/+GjMDeylqCdAgqr8a+fan6ry7xhSKZygRDmPwoUQgNCrdA3Ln/KdGLrJA== X-Received: by 2002:a0c:a9c8:0:b0:64f:3db0:ab31 with SMTP id c8-20020a0ca9c8000000b0064f3db0ab31mr18683692qvb.26.1694032893477; Wed, 06 Sep 2023 13:41:33 -0700 (PDT) Received: from hurd (dsl-153-125.b2b2c.ca. [66.158.153.125]) by smtp.gmail.com with ESMTPSA id z14-20020a0cda8e000000b0063cfe9adb2csm5709352qvj.108.2023.09.06.13.41.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Sep 2023 13:41:33 -0700 (PDT) From: Maxim Cournoyer References: <6cefcfecf409ffdd5fe856c23fbbc7b9cae7161d.1693924596.git.zimon.toutoune@gmail.com> Date: Wed, 06 Sep 2023 16:41:31 -0400 In-Reply-To: <6cefcfecf409ffdd5fe856c23fbbc7b9cae7161d.1693924596.git.zimon.toutoune@gmail.com> (Simon Tournier's message of "Tue, 5 Sep 2023 16:37:32 +0200") Message-ID: <875y4nqbk4.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx2.migadu.com X-Spam-Score: -5.12 X-Migadu-Queue-Id: 34BC25B104 X-Migadu-Spam-Score: -5.12 X-TUID: 61NVcLQw857E Hi Simon, Simon Tournier writes: > Fixes . > Reported by Maxim Cournoyer . nitpick: 'Reported-by:' is a Git trailing (message tag); it should appear at the bottom of the commit message for Git tools to correctly parse it. > * guix/packages.scm (package-field-location): Add package/inherit case. > --- > guix/packages.scm | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/guix/packages.scm b/guix/packages.scm > index ba98bb0fb484..821eddb72d5d 100644 > --- a/guix/packages.scm > +++ b/guix/packages.scm > @@ -761,7 +761,8 @@ (define (package-field-location package field) > (lambda (port) > (go-to-location port line column) > (match (read port) > - (('package inits ...) > + ((or ('package inits ...) > + ('package/inherit inits ...)) I tested it in 'guix repl' for zxing-cpp-1.2, and something didn't go well: --8<---------------cut here---------------start------------->8--- scheme@(guix-user)> ,use (guix packages) scheme@(guix-user)> ,use (gnu packages aidc) scheme@(guix-user)> zxing-cpp-1.2 $1 =3D # scheme@(guix-user)> (package-field-location $1 'version) ice-9/boot-9.scm:1685:16: In procedure raise-exception: In procedure assoc: Wrong type argument: zxing-cpp Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. scheme@(guix-user) [1]> ,bt In ice-9/boot-9.scm: 1747:15 4 (with-exception-handler # _ # _ # =E2=80=A6) In ice-9/ports.scm: 433:17 3 (call-with-input-file _ _ #:binary _ #:encoding _ #:guess-enco= ding _) In guix/packages.scm: 766:32 2 (_ _) In srfi/srfi-1.scm: 241:2 1 (assoc _ _ _) In ice-9/boot-9.scm: 1685:16 0 (raise-exception _ #:continuable? _) --8<---------------cut here---------------end--------------->8--- I modified it like: --8<---------------cut here---------------start------------->8--- modified guix/packages.scm @@ -762,7 +762,7 @@ (define (package-field-location package field) (go-to-location port line column) (match (read port) ((or ('package inits ...) - ('package/inherit parent inits ...)) + ('package/inherit _ inits ...)) (let ((field (assoc field inits))) (match field ((_ value) --8<---------------cut here---------------end--------------->8--- And it now works; yay! Will install shortly. --=20 Thanks, Maxim