gnu-maintenance: Accept underscores as package/version separators.

Fixes <https://bugs.gnu.org/47256>.
Reported by Léo Le Bouter <lle-bout@zaclys.net>.

* guix/gnu-maintenance.scm (%tarball-rx, %package-name-rx): Accept
underscore as the package/version separator in tarball names.
* tests/gnu-maintenance.scm ("release-file?"): Add "mediainfo" test.
This commit is contained in:
Ludovic Courtès 2021-03-20 21:53:27 +01:00
parent 52e64b21be
commit 1710e8cb59
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
2 changed files with 6 additions and 4 deletions

View File

@ -241,7 +241,8 @@ network to check in GNU's database."
;; The .zip extensions is notably used for freefont-ttf.
;; The "-src" pattern is for "TeXmacs-1.0.7.9-src.tar.gz".
;; The "-gnu[0-9]" pattern is for "icecat-38.4.0-gnu1.tar.bz2".
(make-regexp "^([^.]+)-([0-9]|[^-])+(-(src|gnu[0-9]))?\\.(tar\\.|zip$)"))
;; Accept underscores as in "PKG_1.2.tar.gz" for some non-GNU packages.
(make-regexp "^([^.]+)[-_]([0-9]|[^-])+(-(src|gnu[0-9]))?\\.(tar\\.|zip$)"))
(define %alpha-tarball-rx
(make-regexp "^.*-.*[0-9](-|~)?(alpha|beta|rc|RC|cvs|svn|git)-?[0-9\\.]*\\.tar\\."))
@ -594,7 +595,7 @@ list available from %GNU-FILE-LIST-URI over HTTP(S)."
(define %package-name-rx
;; Regexp for a package name, e.g., "foo-X.Y". Since TeXmacs uses
;; "TeXmacs-X.Y-src", the `-src' suffix is allowed.
(make-regexp "^(.*)-(([0-9]|\\.)+)(-src)?"))
(make-regexp "^(.*)[-_](([0-9]|\\.)+)(-src)?"))
(define (gnu-package-name->name+version name+version)
"Return the package name and version number extracted from NAME+VERSION."

View File

@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015, 2021 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@ -29,7 +29,8 @@
'(("gcc" "gcc-5.3.0.tar.bz2")
("texmacs" "TeXmacs-1.0.7.9-src.tar.gz")
("icecat" "icecat-38.4.0-gnu1.tar.bz2")
("mit-scheme" "mit-scheme-9.2.tar.gz")))
("mit-scheme" "mit-scheme-9.2.tar.gz")
("mediainfo" "mediainfo_20.09.tar.xz")))
(every (lambda (project+file)
(not (apply release-file? project+file)))
'(("guile" "guile-www-1.1.1.tar.gz")