summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig>2005-08-22 13:51:40 +0000
committerrillig <rillig>2005-08-22 13:51:40 +0000
commitecd64c6cd88dac777df3a67f9f7fd8809b3166b6 (patch)
tree9e50b72d83bfaf35e8306a9eaf8c544fe671e308 /pkgtools
parent53f542564da2f30a07e91a6462e8fdcdbaa452eb (diff)
downloadpkgsrc-ecd64c6cd88dac777df3a67f9f7fd8809b3166b6.tar.gz
Sorted the regular expression constants alphabetically. Renamed two of them.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/files/pkglint.pl14
1 files changed, 7 insertions, 7 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index 710add9dd6f..c7905d9d2cf 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -11,7 +11,7 @@
# Freely redistributable. Absolutely no warranty.
#
# From Id: portlint.pl,v 1.64 1998/02/28 02:34:05 itojun Exp
-# $NetBSD: pkglint.pl,v 1.254 2005/08/22 05:12:01 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.255 2005/08/22 13:51:40 rillig Exp $
#
# This version contains lots of changes necessary for NetBSD packages
# done by:
@@ -364,17 +364,17 @@ my (%warnings) = (
);
# Constants
-my $regex_rcsidstr = qr"\$($conf_rcsidstr)(?::[^\$]*|)\$";
my $regex_known_rcs_tag = qr"\$(Author|Date|Header|Id|Locker|Log|Name|RCSfile|Revision|Source|State|$conf_rcsidstr)(?::[^\$]*?|)\$";
-my $regex_validchars = qr"[\011\040-\176]";
-my $regex_boolean = qr"^(?:YES|yes|NO|no)$";
-my $regex_yes_or_undef = qr"^(?:YES|yes)$";
my $regex_mail_address = qr"^[-\w\d_.]+\@[-\w\d.]+$";
my $regex_pkgname = qr"^((?:[\w.+]|-[^\d])+)-(\d(?:\w|\.\d)*)$";
+my $regex_rcsidstr = qr"\$($conf_rcsidstr)(?::[^\$]*|)\$";
my $regex_unresolved = qr"\$\{";
my $regex_url = qr"^(?:http://|ftp://|#)"; # allow empty URLs
my $regex_url_directory = qr"(?:http://|ftp://)\S+/";
+my $regex_validchars = qr"[\011\040-\176]";
my $regex_varassign = qr"^([A-Z_a-z0-9.]+)\s*(=|\?=|\+=|:=)\s*(.*)";
+my $regex_yes = qr"^(?:YES|yes)$";
+my $regex_yesno = qr"^(?:YES|yes|NO|no)$";
# Global variables
my $pkgdir;
@@ -1101,12 +1101,12 @@ sub check_Makefile_vartype($$) {
} elsif (exists($vartypes->{$varname})) {
my ($type) = ($vartypes->{$varname});
if ($type eq "Boolean") {
- if ($value !~ $regex_boolean) {
+ if ($value !~ $regex_yesno) {
$line->log_warning("$varname should be set to YES, yes, NO, or no.");
}
} elsif ($type eq "Yes_Or_Undefined") {
- if ($value !~ $regex_yes_or_undef) {
+ if ($value !~ $regex_yes) {
$line->log_warning("$varname should be set to YES or yes.");
}