pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/pkgtools/url2pkg



Module Name:    pkgsrc
Committed By:   rillig
Date:           Sun May 23 16:27:40 UTC 2021

Modified Files:
        pkgsrc/pkgtools/url2pkg: Makefile
        pkgsrc/pkgtools/url2pkg/files: url2pkg.py url2pkg_test.py

Log Message:
url2pkg: update to 21.1.0

Changes since 20.4.0:

Fixed handling of GitHub archive URLs with extra slashes, such as
https://github.com/org/proj/archive/refs/tags/1.0.0.tar.gz.


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 pkgsrc/pkgtools/url2pkg/Makefile
cvs rdiff -u -r1.28 -r1.29 pkgsrc/pkgtools/url2pkg/files/url2pkg.py \
    pkgsrc/pkgtools/url2pkg/files/url2pkg_test.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/pkgtools/url2pkg/Makefile
diff -u pkgsrc/pkgtools/url2pkg/Makefile:1.117 pkgsrc/pkgtools/url2pkg/Makefile:1.118
--- pkgsrc/pkgtools/url2pkg/Makefile:1.117      Mon Dec 28 01:48:19 2020
+++ pkgsrc/pkgtools/url2pkg/Makefile    Sun May 23 16:27:39 2021
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.117 2020/12/28 01:48:19 rillig Exp $
+# $NetBSD: Makefile,v 1.118 2021/05/23 16:27:39 rillig Exp $
 
-PKGNAME=       url2pkg-20.4.0
+PKGNAME=       url2pkg-21.1.0
 CATEGORIES=    pkgtools
 
 MAINTAINER=    rillig%NetBSD.org@localhost

Index: pkgsrc/pkgtools/url2pkg/files/url2pkg.py
diff -u pkgsrc/pkgtools/url2pkg/files/url2pkg.py:1.28 pkgsrc/pkgtools/url2pkg/files/url2pkg.py:1.29
--- pkgsrc/pkgtools/url2pkg/files/url2pkg.py:1.28       Sat Oct 17 22:39:01 2020
+++ pkgsrc/pkgtools/url2pkg/files/url2pkg.py    Sun May 23 16:27:39 2021
@@ -1,5 +1,5 @@
 #! @PYTHONBIN@
-# $NetBSD: url2pkg.py,v 1.28 2020/10/17 22:39:01 rillig Exp $
+# $NetBSD: url2pkg.py,v 1.29 2021/05/23 16:27:39 rillig Exp $
 
 # Copyright (c) 2019 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -410,7 +410,8 @@ class Generator:
             https://github\.com/
             (.+)/               # org
             (.+)/archive/       # proj
-            (.+)                # tag
+            ((?:.+/)?           # tag
+                     (.+))      # distname
             (\.tar\.gz|\.zip)   # ext
             $
             '''
@@ -418,7 +419,7 @@ class Generator:
         if not m:
             return
 
-        org, proj, tag, ext = m.groups()
+        org, proj, tag, distname, ext = m.groups()
 
         self.github_project = proj
         self.github_tag = tag
@@ -427,7 +428,7 @@ class Generator:
         if proj not in tag:
             self.pkgname_prefix = '${GITHUB_PROJECT}-'
             self.dist_subdir = '${GITHUB_PROJECT}'
-        self.distfile = tag + ext
+        self.distfile = distname + ext
 
     def adjust_site_GitHub_release(self):
         pattern = r'''(?x)
Index: pkgsrc/pkgtools/url2pkg/files/url2pkg_test.py
diff -u pkgsrc/pkgtools/url2pkg/files/url2pkg_test.py:1.28 pkgsrc/pkgtools/url2pkg/files/url2pkg_test.py:1.29
--- pkgsrc/pkgtools/url2pkg/files/url2pkg_test.py:1.28  Sun May 23 16:20:46 2021
+++ pkgsrc/pkgtools/url2pkg/files/url2pkg_test.py       Sun May 23 16:27:39 2021
@@ -1,4 +1,4 @@
-# $NetBSD: url2pkg_test.py,v 1.28 2021/05/23 16:20:46 rillig Exp $
+# $NetBSD: url2pkg_test.py,v 1.29 2021/05/23 16:27:39 rillig Exp $
 
 import pytest
 from url2pkg import *
@@ -440,8 +440,7 @@ def test_Generator_adjust_site_GitHub_ar
         '',
         'GITHUB_PROJECT= proj',
         'GITHUB_TAG=     refs/tags/1.0.0',
-        # FIXME: DISTNAME must not contain slashes
-        'DISTNAME=       refs/tags/1.0.0',
+        'DISTNAME=       1.0.0',
         'PKGNAME=        ${GITHUB_PROJECT}-${DISTNAME}',
         'CATEGORIES=     pkgtools',
         'MASTER_SITES=   ${MASTER_SITE_GITHUB:=org/}',



Home | Main Index | Thread Index | Old Index