From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id GD96EBmqkWCLPQAAgWs5BA (envelope-from ) for ; Tue, 04 May 2021 22:10:01 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id L+X6CxmqkWCbJQAAbx9fmQ (envelope-from ) for ; Tue, 04 May 2021 20:10:01 +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 9DFD91ACB7 for ; Tue, 4 May 2021 22:10:00 +0200 (CEST) Received: from localhost ([::1]:35038 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1le1Ml-0003cR-Ga for larch@yhetil.org; Tue, 04 May 2021 16:09:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58586) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1le1Lq-00031t-Bw for bug-guix@gnu.org; Tue, 04 May 2021 16:09:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43616) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1le1Lq-0006LQ-3e for bug-guix@gnu.org; Tue, 04 May 2021 16:09:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1le1Lp-0007qj-V2 for bug-guix@gnu.org; Tue, 04 May 2021 16:09:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#48225: Wrong result of package-name->name+version Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 04 May 2021 20:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48225 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Guillaume Le Vaillant Received: via spool by 48225-submit@debbugs.gnu.org id=B48225.162015890830165 (code B ref 48225); Tue, 04 May 2021 20:09:01 +0000 Received: (at 48225) by debbugs.gnu.org; 4 May 2021 20:08:28 +0000 Received: from localhost ([127.0.0.1]:55159 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1le1LI-0007qT-J2 for submit@debbugs.gnu.org; Tue, 04 May 2021 16:08:28 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50182) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1le1LG-0007qM-9P for 48225@debbugs.gnu.org; Tue, 04 May 2021 16:08:26 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59355) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1le1LB-0005x9-0x; Tue, 04 May 2021 16:08:21 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=60592 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1le1L8-00079U-Ml; Tue, 04 May 2021 16:08:20 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87o8dqy636.fsf@yamatai> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 15 =?UTF-8?Q?Flor=C3=A9al?= an 229 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 04 May 2021 22:08:17 +0200 In-Reply-To: <87o8dqy636.fsf@yamatai> (Guillaume Le Vaillant's message of "Tue, 04 May 2021 13:35:41 +0000") Message-ID: <87pmy6l0su.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.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: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 48225@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1620159000; 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-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; bh=UwZxYXhRJWy0n/5mw4/NCCv6rmQNzSZuhBZP2gR29BU=; b=XUlgP+qmqJKs/HXTxxhPIujhE2+WENHRpYI2r+Maw3LtGpr6CSE8MutaAGLtWJ0pK/nb9b brXR/npxSIruDF4xYyzQLgJrkZfBAH8V3ewXzULYDpZb+a4zZFoeh0+nz5SseaWFhlhPNd VCFAJWW9curYRYTPb0ggWV3GHm47aeaE64TtD4qZLQWd1JL9AhqCRtv1bJvcgu7R+9f3Wj BdmvD654QMa0JN9q9PNI73Al2oCkDfP2aWqRkAUdJ4ih9OPqicXXhxQHPQDgr1O6I9QCaq BZm/jptu73QJffnDr9r0ZrJI1W41erSPmWHRIwTd7vxvqUr49H9zZLf0dtIwAQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620159000; a=rsa-sha256; cv=none; b=t3+KtciSZRf/0FOiKxR+UIG06S/LbX8aeSHnrTn2zudTqMnaRmv8TAE1MW534ntYrPOvbs NN9adZkPZUYyMuOR1wxDA7tT9/cmUSHrv8Y6M+D+6rLXnzLv4tlujiadaRBR/6nH5azni9 pyC0toPg0reXr4OHeCqNgmUmbzreqFWaTfbsclTgmQCK+B2z8wTV9bt3O40mmMSpOCP5n6 OO+7/NUayUP7nTwdU2TcWuL4JyyPDRMXarCEynkxh4Ucci2uaFE2zbbZtt0SBsNDyQevH2 QgCkB+vGizRCXepoNbFV5fVUmZ3MowRZNhIA13pR5CP0WgP/FWoIPa2KRfFHlw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -1.46 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 9DFD91ACB7 X-Spam-Score: -1.46 X-Migadu-Scanner: scn0.migadu.com X-TUID: nFqKU6O2/rLJ Hi Guillaume, Guillaume Le Vaillant skribis: > The 'package-name->name+version' function defined in > "guix/build/utils.scm" returns a wrong result if there is a '-' > followed by a number in the package name: > > (use-modules ((guix build utils))) > (package-name->name+version "sbcl-3d-vectors-3.1.0-1.29bb968") > > $1 =3D "sbcl" > $2 =3D "3d-vectors-3.1.0-1.29bb968" > > > It should be: > > $1 =3D "sbcl-3d-vectors" > $2 =3D "3.1.0-1.29bb968" > > Can someone think of an elegant modification for > 'package-name->name+version' so that it finds where the version is > even if there are several hyphens before of after it (as in > "sbcl-3d-vectors-3.1.0-1.29bb968" or "nyxt-2-pre-release-6")? It=E2=80=99s implements a heuristic meant to work for most packages. It=E2= =80=99s hard to tweak that without breaking something else instead. (Plus, =E2=80=9Cnyxt-2-pre-release-6=E2=80=9D looks really bogus to me.) A better fix would be to not guess and instead pass #:name and #:version to all the build phases, with the value taken from the object. (That=E2=80=99s a world-rebuild fix though.) WDYT? > This is related to issue #48208, and also probably to issue #41437. Perhaps we can find a workaround for these? Thanks, Ludo=E2=80=99.