GNU bug report logs - #48225
Wrong result of package-name->name+version

Previous Next

Package: guix;

Reported by: Guillaume Le Vaillant <glv <at> posteo.net>

Date: Tue, 4 May 2021 13:36:01 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Guillaume Le Vaillant <glv <at> posteo.net>
To: 48225 <at> debbugs.gnu.org
Subject: bug#48225: Wrong result of package-name->name+version
Date: Tue, 04 May 2021 13:35:41 +0000
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.




This bug report was last modified 4 years and 37 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.