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:           Sat Aug 17 11:57:36 UTC 2019

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

Log Message:
pkgtools/url2pkg: fix parsing of mk/fetch/sites.mk

Before, the final line of each MASTER_SITE_* definition had been skipped
because it didn't end with a backslash. That part of the regular
expression had always been intended to be optional. That bug lasted
almost 13 years, which is remarkably long but not the record.

The mk/fetch/sites.mk is now closed properly, which has gone unnoticed
for almost 13 years as well.

Google Code doesn't exist anymore, therefore there's no point in keeping
it.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 pkgsrc/pkgtools/url2pkg/files/url2pkg.pl

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.pl
diff -u pkgsrc/pkgtools/url2pkg/files/url2pkg.pl:1.39 pkgsrc/pkgtools/url2pkg/files/url2pkg.pl:1.40
--- pkgsrc/pkgtools/url2pkg/files/url2pkg.pl:1.39       Sat May 25 03:58:50 2019
+++ pkgsrc/pkgtools/url2pkg/files/url2pkg.pl    Sat Aug 17 11:57:36 2019
@@ -1,5 +1,5 @@
 #! @PERL@
-# $NetBSD: url2pkg.pl,v 1.39 2019/05/25 03:58:50 maya Exp $
+# $NetBSD: url2pkg.pl,v 1.40 2019/08/17 11:57:36 rillig Exp $
 #
 
 # Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -273,7 +273,7 @@ sub generate_initial_package($) {
                if ($line =~ qr"^(MASTER_SITE_.*)\+=") {
                        $master_site = $1;
 
-               } elsif ($line =~ qr"^\t(.*?)(?:\s+\\)$") {
+               } elsif ($line =~ qr"^\t(.*?)(?:\s+\\)?$") {
                        my ($site) = ($1);
 
                        if (index($url, $site) == 0) {
@@ -297,8 +297,9 @@ sub generate_initial_package($) {
                        }
                }
        }
+       close(SITES) or die;
 
-       if (!$found) {
+       if (true) {
                if ($url =~ qr"^http://(?:pr)?downloads\.sourceforge\.net/([^/]*)/([^/?]+)(?:\?(?:download|use_mirror=.*))?$") {
                        my $pkgbase = $1;
                        $distfile = $2;
@@ -309,17 +310,7 @@ sub generate_initial_package($) {
                }
        }
 
-       if (!$found) {
-               if ($url =~ qr"^http://([^.]*).googlecode\.com/files/(.*$)") {
-                       my $pkgbase = $1;
-                       $distfile = $2;
-                       $master_sites = "http://${pkgbase}.googlecode.com/files/";;
-                       $homepage = "http://code.google.com/p/${pkgbase}/";;
-                       $found = true;
-               }
-       }
-
-       if (!$found) {
+       if (true) {
                if ($url =~ qr"^https?://github\.com/") {
                        if ($url =~ qr"^https?://github\.com/(.*)/(.*)/archive/(.*)(\.tar\.gz|\.zip)$") {
                                $master_sites = "\${MASTER_SITE_GITHUB:=$1/}";



Home | Main Index | Thread Index | Old Index