ports/55529: [PATCH] update of devel/portlint to recognize eg. autocommands

Jens Rehsack rehsack at liwing.de
Wed Aug 13 08:40:22 UTC 2003


>Number:         55529
>Category:       ports
>Synopsis:       [PATCH] update of devel/portlint to recognize eg. autocommands
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 13 01:40:18 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Jens Rehsack
>Release:        FreeBSD 5.1-CURRENT i386
>Organization:
LiWing IT-Services
>Environment:
System: FreeBSD statler 5.1-CURRENT FreeBSD 5.1-CURRENT #0: Mon Aug 11 08:11:10 GMT 2003 trevor at statler:/usr/obj/usr/src/sys/STATLER i386


	
>Description:
	Before submitting new port in PR ports/55514 I tested it with portlint.
	The morning after I detected, that I'm using aclocal and libtoolize
	directly instead of using ${ACLOCAL}. So I'm adding the according test
	inclusive WARN to portlint.
>How-To-Repeat:
	
>Fix:

	

--- patch-moreargs begins here ---
Index: devel/portlint/src/portlint.pl
===================================================================
diff -u devel/portlint/src/portlint.pl.orig devel/portlint/src/portlint.pl
--- devel/portlint/src/portlint.pl.orig	Wed Aug 13 07:56:38 2003
+++ devel/portlint/src/portlint.pl	Wed Aug 13 08:27:07 2003
@@ -870,7 +870,8 @@
 	print "OK: checking direct use of command names.\n" if ($verbose);
 	foreach my $i (qw(
 awk basename cat chmod chown cp echo expr false file find gmake grep gzcat
-ldconfig ln md5 mkdir mv patch rm rmdir sed sh touch tr which xargs xmkmf
+ldconfig ln md5 mkdir mv patch perl rm rmdir ruby sed sh touch tr which
+xargs xmkmf
 	)) {
 		$cmdnames{$i} = "\$\{\U$i\E\}";
 	}
@@ -878,7 +879,13 @@
 	$cmdnames{'gunzip'} = '${GUNZIP_CMD}';
 	$cmdnames{'gzip'} = '${GZIP_CMD}';
 	$cmdnames{'install'} = '${INSTALL_foobaa}';
+	$cmdnames{'python'} = '${PYTHON_CMD}';
 	$cmdnames{'strip'} = '${STRIP_CMD}';
+	foreach my $i (qw(
+aclocal autoconf autoheader automake autoreconf autoupdate autoscan ifnames libtool libtoolize
+	)) {
+		$autocmdnames{$i} = "\$\{" . ( ( $i !~ /auto|aclocal/ ) ? "AUTO" : "" ) . "\U$i\E\}";
+	}
 	#
 	# ignore parameter string to echo command.
 	# note that we leave the command as is, since we need to check the
@@ -891,6 +898,16 @@
 	     && $j !~ /^COMMENT(.)?=/) {
 			&perror("WARN: possible direct use of command \"$i\" ".
 				"found. use $cmdnames{$i} instead.");
+		}
+	}
+
+	foreach my $i (keys %autocmdnames) {
+		if ($j =~ /[\s\/]($i\d*)[\s;]/
+		 && $j !~ /\n[A-Z]+_TARGET[?+]?=[^\n]+($i\d*)/
+		 && $j !~ /^COMMENT(.)?=/) {
+			&perror("WARN: possible direct use of command \"$1\" ".
+				"found. Use $autocmdnames{$i} instead and ".
+				"set according USE_*_VER= flag");
 		}
 	}
 
--- patch-moreargs ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list