pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/url2pkg url2pkg: update to 21.1.0



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9b354fd7cfed
branches:  trunk
changeset: 453121:9b354fd7cfed
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sun May 23 16:27:39 2021 +0000

description:
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.

diffstat:

 pkgtools/url2pkg/Makefile              |  4 ++--
 pkgtools/url2pkg/files/url2pkg.py      |  9 +++++----
 pkgtools/url2pkg/files/url2pkg_test.py |  5 ++---
 3 files changed, 9 insertions(+), 9 deletions(-)

diffs (69 lines):

diff -r aa460a6f42ac -r 9b354fd7cfed pkgtools/url2pkg/Makefile
--- a/pkgtools/url2pkg/Makefile Sun May 23 16:20:46 2021 +0000
+++ b/pkgtools/url2pkg/Makefile Sun May 23 16:27:39 2021 +0000
@@ -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
diff -r aa460a6f42ac -r 9b354fd7cfed pkgtools/url2pkg/files/url2pkg.py
--- a/pkgtools/url2pkg/files/url2pkg.py Sun May 23 16:20:46 2021 +0000
+++ b/pkgtools/url2pkg/files/url2pkg.py Sun May 23 16:27:39 2021 +0000
@@ -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 @@
             https://github\.com/
             (.+)/               # org
             (.+)/archive/       # proj
-            (.+)                # tag
+            ((?:.+/)?           # tag
+                     (.+))      # distname
             (\.tar\.gz|\.zip)   # ext
             $
             '''
@@ -418,7 +419,7 @@
         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 @@
         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)
diff -r aa460a6f42ac -r 9b354fd7cfed pkgtools/url2pkg/files/url2pkg_test.py
--- a/pkgtools/url2pkg/files/url2pkg_test.py    Sun May 23 16:20:46 2021 +0000
+++ b/pkgtools/url2pkg/files/url2pkg_test.py    Sun May 23 16:27:39 2021 +0000
@@ -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 @@
         '',
         '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