pkgsrc-Changes archive

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

CVS commit: pkgsrc/pkgtools/url2pkg/files



Module Name:    pkgsrc
Committed By:   rillig
Date:           Tue Feb  8 20:48:09 UTC 2022

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

Log Message:
url2pkg: make code for analyzing CPAN URLs simpler

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 pkgsrc/pkgtools/url2pkg/files/url2pkg.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/files/url2pkg.py
diff -u pkgsrc/pkgtools/url2pkg/files/url2pkg.py:1.41 pkgsrc/pkgtools/url2pkg/files/url2pkg.py:1.42
--- pkgsrc/pkgtools/url2pkg/files/url2pkg.py:1.41       Sun Feb  6 21:07:44 2022
+++ pkgsrc/pkgtools/url2pkg/files/url2pkg.py    Tue Feb  8 20:48:09 2022
@@ -1,5 +1,5 @@
 #! @PYTHONBIN@
-# $NetBSD: url2pkg.py,v 1.41 2022/02/06 21:07:44 rillig Exp $
+# $NetBSD: url2pkg.py,v 1.42 2022/02/08 20:48:09 rillig Exp $
 
 # Copyright (c) 2019 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -407,8 +407,8 @@ class PackageVars:
             ^
             https://cpan.metacpan.org/authors
             /id/(?:\w+/)+
-            (\w+-)+         # namespace prefixes
-            (               # distname
+            (               # distfile
+                (\w+-)+     # namespace prefixes
                 (\w+)       # project name
                 -v?[0-9].+
             )
@@ -418,12 +418,12 @@ class PackageVars:
         if not m:
             return
 
-        prefixes, distfile, name = m.groups()
+        distfile, prefixes, name = m.groups()
         prefixes_slash = prefixes.replace('-', '/')
         prefixes_colon = prefixes.replace('-', '::')
         self.master_sites = f'${{MASTER_SITE_PERL_CPAN:={prefixes_slash}}}'
         self.homepage = f'https://metacpan.org/pod/{prefixes_colon}{name}'
-        self.distfile = f'{prefixes}{distfile}'
+        self.distfile = distfile
         self.pkgname_prefix = 'p5-'
 
     def adjust_site_SourceForge(self):



Home | Main Index | Thread Index | Old Index