summary refs log tree commit diff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-05-28 22:43:21 +0200
committerLudovic Courtès <ludo@gnu.org>2021-05-28 23:04:44 +0200
commitd7c356edb9719f1e236ee926c0288f914076481a (patch)
tree70bc31b93b678778af6925a62d1b56ec70b7d1d6
parent803be0975dbd31d16d75e6bc7154e8caa07cacb0 (diff)
downloadguix-d7c356edb9719f1e236ee926c0288f914076481a.tar.gz
gnu-maintenance: 'release-file?' accepts 'v' prefix as in "PKG-v1.2.tgz".
* guix/gnu-maintenance.scm (%tarball-rx, %package-name-rx): Accept 'v'
and 'V' prefixes.  Accept ".tgz" extension.
* tests/gnu-maintenance.scm ("release-file?"): Add test.
-rw-r--r--guix/gnu-maintenance.scm5
-rw-r--r--tests/gnu-maintenance.scm3
2 files changed, 5 insertions, 3 deletions
diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm
index fece84b341..4e3a54dcab 100644
--- a/guix/gnu-maintenance.scm
+++ b/guix/gnu-maintenance.scm
@@ -243,7 +243,8 @@ network to check in GNU's database."
   ;; 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".
   ;; Accept underscores as in "PKG_1.2.tar.gz" for some non-GNU packages.
-  (make-regexp "^([^.]+)[-_]([0-9]|[^-])+(-(src|[sS]ource|gnu[0-9]))?\\.(tar\\.|zip$)"))
+  ;; Accept 'v' or 'V' prefix as in 'PKG-v2.3.tgz'.
+  (make-regexp "^([^.]+)[-_][vV]?([0-9]|[^-])+(-(src|[sS]ource|gnu[0-9]))?\\.(tar\\.|tgz|zip$)"))
 
 (define %alpha-tarball-rx
   (make-regexp "^.*-.*[0-9](-|~)?(alpha|beta|rc|RC|cvs|svn|git)-?[0-9\\.]*\\.tar\\."))
@@ -596,7 +597,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|\\.src|\\.orig)?"))
+  (make-regexp "^(.*)[-_][vV]?(([0-9]|\\.)+)(-src|\\.src|\\.orig)?"))
 
 (define (gnu-package-name->name+version name+version)
   "Return the package name and version number extracted from NAME+VERSION."
diff --git a/tests/gnu-maintenance.scm b/tests/gnu-maintenance.scm
index 837b80063a..c04d8ba733 100644
--- a/tests/gnu-maintenance.scm
+++ b/tests/gnu-maintenance.scm
@@ -34,7 +34,8 @@
                 ("mediainfo" "mediainfo_20.09.tar.xz")
                 ("exiv2" "exiv2-0.27.3-Source.tar.gz")
                 ("mpg321" "mpg321_0.3.2.orig.tar.gz")
-                ("bvi" "bvi-1.4.1.src.tar.gz")))
+                ("bvi" "bvi-1.4.1.src.tar.gz")
+                ("hostscope" "hostscope-V2.1.tgz")))
        (every (lambda (project+file)
                 (not (apply release-file? project+file)))
               '(("guile" "guile-www-1.1.1.tar.gz")