tech-pkg archive

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

Re: Patterns like >=x.*



 >> and would like to apply the following patch. Objections?

> I'd prefer a similar check in pkglint, please.

Done.

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/pkglint/Makefile,v
retrieving revision 1.437
diff -u -r1.437 Makefile
--- Makefile    5 Jan 2014 11:26:06 -0000       1.437
+++ Makefile    12 Jan 2014 23:29:23 -0000
@@ -3,7 +3,7 @@
 # Note: if you update the version number, please have a look at the
 # changes between the CVS tag "pkglint_current" and HEAD.
 # After updating, please re-set the CVS tag to HEAD.
-DISTNAME=      pkglint-4.134
+DISTNAME=      pkglint-4.135
 CATEGORIES=    pkgtools
 MASTER_SITES=  # none
 DISTFILES=     # none
Index: files/pkglint.pl
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/pkglint/files/pkglint.pl,v
retrieving revision 1.861
diff -u -r1.861 pkglint.pl
--- files/pkglint.pl    5 Jan 2014 11:26:06 -0000       1.861
+++ files/pkglint.pl    12 Jan 2014 23:29:26 -0000
@@ -291,7 +291,7 @@
 # Commonly used regular expressions.
 #
 
-use constant regex_dependency_gt => 
qr"^((?:\$\{[\w_]+\}|[\w_\.]|-[^\d])+)>=(\d[^-]*)$";
+use constant regex_dependency_lge => 
qr"^((?:\$\{[\w_]+\}|[\w_\.]|-[^\d])+)[<>]=?(\d[^-*?\[\]]*)$";
 use constant regex_dependency_wildcard
                                => 
qr"^((?:\$\{[\w_]+\}|[\w_\.]|-[^\d\[])+)-(?:\[0-9\]\*|\d[^-]*)$";
 use constant regex_gnu_configure_volatile_vars
@@ -3959,7 +3959,7 @@
 "foo-* matches foo-1.2, but also foo-client-1.2 and foo-server-1.2.");
 
                                } else {
-                                       $line->log_warning("Unknown dependency 
pattern \"${value}\".");
+                                       $line->log_error("Unknown dependency 
pattern \"${value}\".");
                                }
 
                        } elsif ($value =~ m"\{") {
@@ -3997,12 +3997,12 @@
 
                                }
 
-                               if ($pattern =~ regex_dependency_gt) {
+                               if ($pattern =~ regex_dependency_lge) {
 #                              ($abi_pkg, $abi_version) = ($1, $2);
                                } elsif ($pattern =~ regex_dependency_wildcard) 
{
 #                              ($abi_pkg) = ($1);
                                } else {
-                                       $line->log_warning("Unknown dependency 
pattern \"${pattern}\".");
+                                       $line->log_error("Unknown dependency 
pattern \"${pattern}\".");
                                }
 
                        } elsif ($value =~ m":\.\./[^/]+$") {
@@ -5621,7 +5621,7 @@
 
                        if ($varname eq "BUILDLINK_ABI_DEPENDS.${bl_pkgbase}") {
                                $abi_line = $line;
-                               if ($value =~ regex_dependency_gt) {
+                               if ($value =~ regex_dependency_lge) {
                                        ($abi_pkg, $abi_version) = ($1, $2);
                                } elsif ($value =~ regex_dependency_wildcard) {
                                        ($abi_pkg) = ($1);
@@ -5632,7 +5632,7 @@
                        }
                        if ($varname eq "BUILDLINK_API_DEPENDS.${bl_pkgbase}") {
                                $api_line = $line;
-                               if ($value =~ regex_dependency_gt) {
+                               if ($value =~ regex_dependency_lge) {
                                        ($api_pkg, $api_version) = ($1, $2);
                                } elsif ($value =~ regex_dependency_wildcard) {
                                        ($api_pkg) = ($1);
@@ -5781,7 +5781,7 @@
 
                        if ($varname eq "BUILDLINK_ABI_DEPENDS.${bl_pkgbase}") {
                                $abi_line = $line;
-                               if ($value =~ regex_dependency_gt) {
+                               if ($value =~ regex_dependency_lge) {
                                        ($abi_pkg, $abi_version) = ($1, $2);
                                } elsif ($value =~ regex_dependency_wildcard) {
                                        ($abi_pkg) = ($1);
@@ -5792,7 +5792,7 @@
                        }
                        if ($varname eq "BUILDLINK_API_DEPENDS.${bl_pkgbase}") {
                                $api_line = $line;
-                               if ($value =~ regex_dependency_gt) {
+                               if ($value =~ regex_dependency_lge) {
                                        ($api_pkg, $api_version) = ($1, $2);
                                } elsif ($value =~ regex_dependency_wildcard) {
                                        ($api_pkg) = ($1);
-- 
Best regards, Aleksey Cheusov.


Home | Main Index | Thread Index | Old Index