From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yCA9IH5OkWBGBQEAgWs5BA (envelope-from ) for ; Tue, 04 May 2021 15:39:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id kC7zG35OkWAxEAAA1q6Kng (envelope-from ) for ; Tue, 04 May 2021 13:39:10 +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 C27DB12E78 for ; Tue, 4 May 2021 15:39:09 +0200 (CEST) Received: from localhost ([::1]:40146 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldvGW-0002kg-Uo for larch@yhetil.org; Tue, 04 May 2021 09:39:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45126) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldvDW-00014B-44 for bug-guix@gnu.org; Tue, 04 May 2021 09:36:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41722) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ldvDV-00041N-SD for bug-guix@gnu.org; Tue, 04 May 2021 09:36:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ldvDV-0007qE-OM for bug-guix@gnu.org; Tue, 04 May 2021 09:36:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#48225: Wrong result of package-name->name+version Resent-From: Guillaume Le Vaillant Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 04 May 2021 13:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48225 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 48225@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162013535630134 (code B ref -1); Tue, 04 May 2021 13:36:01 +0000 Received: (at submit) by debbugs.gnu.org; 4 May 2021 13:35:56 +0000 Received: from localhost ([127.0.0.1]:53268 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldvDQ-0007py-Ea for submit@debbugs.gnu.org; Tue, 04 May 2021 09:35:56 -0400 Received: from lists.gnu.org ([209.51.188.17]:37176) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldvDM-0007ps-3L for submit@debbugs.gnu.org; Tue, 04 May 2021 09:35:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45078) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldvDL-0000nX-Pe for bug-guix@gnu.org; Tue, 04 May 2021 09:35:51 -0400 Received: from mout02.posteo.de ([185.67.36.66]:52135) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldvDI-0003qg-7h for bug-guix@gnu.org; Tue, 04 May 2021 09:35:51 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 30A642400FD for ; Tue, 4 May 2021 15:35:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1620135344; bh=ks2BNSVIJNGVmM4F9psH1Xy0tVCh4hiduQ8dkS2dotM=; h=From:To:Subject:Date:From; b=L28aSxNDns6kBRTFvPsieGFl4RdKItOBZWnf8ViFeC2dU4qNbA5dU4VTI6z7tA8p4 GlxT39Ttr5mtpP18emvnTIG/RegW/gdwQlipE1rCmsnm9f2Q9HsXkzn166vkzEQlNW vTa7N4W+6ihGdLJ63OQIBVaCL9wfbPWVmHv5nLXeDxRyLNw6RBBnFI8qszxx9/hJV5 NttK7ewmFbYOuhrf7B8MgqGtlJn/PCiDsb+TAdxZaaSJ16qFQlupuXATYMdZ7GrPw1 x4Nux9S71UiNvH+XY10+iXp7vxV69pn+pLZIgaZdwgfUynaZJnYwQuXZgOAkqCwug0 2xE+HGx2W89ag== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FZLSv0pkRz6tm5 for ; Tue, 4 May 2021 15:35:42 +0200 (CEST) From: Guillaume Le Vaillant Date: Tue, 04 May 2021 13:35:41 +0000 Message-ID: <87o8dqy636.fsf@yamatai> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=glv@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=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: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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=1620135550; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=ks2BNSVIJNGVmM4F9psH1Xy0tVCh4hiduQ8dkS2dotM=; b=hGjcV3dhXwZkZ5AatEEbl/NVP7UTDKR0rO0zpM1YZdfwKqEIesQcBOobzOd0veHpLUVB+b I21mD7mOefX6dwwu0XCuxxNf+2YnONG6LlSjeSfWjCMK0khHM7Zbw8Z07nUnagDiIVJIn/ 7QOuTnVrPzUFAOQcjECASFfIvzAIHQuX6WQnoquRz49mZglrgkL9c7q69Qn0hoX57x9URy vV6rAUyWff12hfLsWgahHJXpSJ6MIIDn0z5zYusn0fngRXR3YmAt1V+eGzulswO6WrsyYY eOtiFs5ScLYU4XWMTjkplxywj+UlTBZ5KM+MPqm22pz8sAXYTy5fcVOh1TDQXw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620135550; a=rsa-sha256; cv=none; b=RXDaKYi/QrxfEdkLfzTu1odkBm6zJ//xyNQAFIc+uJMrV+Ts+O/NDyqVAp+scTxKUuBRgs cjJcYV5LUxycvK5Yv409XFq6aaDYXAKw4K8JLY9ppX3xaHqIslv1/c5J4H75Oervqvmjcm WIPHYdFewKb7ZKGJyOXPSJnrGpvQSVPK1Voa9VsdM3kFVcOx5tZTTthtzm9ufh5Wr5CQgw diDPaZsbHvCvPgXlwFX5/IA9nE+tfqM9vbxwnyL+YupG6lqZYF6/ShB3lX2glaUcLLdoxQ yyiuYaGYEymP9+AfKGzcrtRjZp60XNOQa92g11K1WfYCaeVQcuMgKxYyL24p6g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=L28aSxND; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=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: -0.86 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=L28aSxND; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=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-Queue-Id: C27DB12E78 X-Spam-Score: -0.86 X-Migadu-Scanner: scn0.migadu.com X-TUID: 7mpZJt2fNs/F Hi, 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: --8<---------------cut here---------------start------------->8--- (use-modules ((guix build utils))) (package-name->name+version "sbcl-3d-vectors-3.1.0-1.29bb968") $1 = "sbcl" $2 = "3d-vectors-3.1.0-1.29bb968" --8<---------------cut here---------------end--------------->8--- It should be: --8<---------------cut here---------------start------------->8--- $1 = "sbcl-3d-vectors" $2 = "3.1.0-1.29bb968" --8<---------------cut here---------------end--------------->8--- 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")? This is related to issue #48208, and also probably to issue #41437.