[Midnightbsd-cvs] mports: Tools/scripts: Add support for -s (skip check for destdir.).

ctriv at midnightbsd.org ctriv at midnightbsd.org
Wed Nov 14 13:51:17 EST 2007


Log Message:
-----------
Add support for -s (skip check for destdir.).

Modified Files:
--------------
    mports/Tools/scripts:
        chkfake (r1.4 -> r1.5)
        chkfake.pl (r1.6 -> r1.7)

-------------- next part --------------
Index: chkfake.pl
===================================================================
RCS file: /home/cvs/mports/Tools/scripts/chkfake.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -L Tools/scripts/chkfake.pl -L Tools/scripts/chkfake.pl -u -r1.6 -r1.7
--- Tools/scripts/chkfake.pl
+++ Tools/scripts/chkfake.pl
@@ -37,6 +37,12 @@
 
 my ($plist, $destdir, $prefix) = @ARGV;
 
+my $skip = '';
+if ($ARGV[3] && $ARGV[3] eq '-s') {
+  $skip = $ARGV[4];
+  $skip =~ s/\s+/|/g;
+  $skip = qr/^(?:$skip)$/;
+}
 
 open(my $fh, '<', $plist) || die "Couldn't open $plist: $!\n";
 
@@ -58,12 +64,7 @@
   next if -l "$destdir$cwd/$_";
   
   if (-e "$destdir$cwd/$_") {
-    # There is a bug in perl's MakeMaker which causes the packlist to contain
-    # the DESTDIR.  This bug is harmless, so we'll ignore it.  See rt.cpan.org
-    # bug 3003 for details.
-    next if m/.packlist$/;
-    
-    if (grep_file($destdir, "$destdir$cwd/$_")) {
+    if (!m/$skip/ && grep_file($destdir, "$destdir$cwd/$_")) {
       $ok = 0;
       print "    $_ contains the fake destdir.";
     }
Index: chkfake
===================================================================
RCS file: /home/cvs/mports/Tools/scripts/chkfake,v
retrieving revision 1.4
retrieving revision 1.5
diff -L Tools/scripts/chkfake -L Tools/scripts/chkfake -u -r1.4 -r1.5
--- Tools/scripts/chkfake
+++ Tools/scripts/chkfake
@@ -41,6 +41,10 @@
 PREFIX=$3
 CWD=$PREFIX
 
+if [ ! -z "$4" -a "$4" = '-s' ]; then
+	SKIP=`echo $5 | sed -E 's/ /\\|/g'`
+fi
+
 EXIT=0
 
 echo "Checking $DESTDIR"
@@ -58,13 +62,10 @@
 		continue;
 	fi
 	if [ -e $DESTDIR$CWD/$ENTRY ]; then
-		# There is a bug in perl's MakeMaker which causes the packlist to contain
-		# the DESTDIR.  This bug is harmless, so we'll ignore it.  See rt.cpan.org
-		# bug 3003 for details.
-		if echo $ENTRY | grep -e '.packlist$' > /dev/null; then
+		if echo $ENTRY | grep -e "^$SKIP$" > /dev/null; then
 			continue;
 		fi
-
+		
 		if grep $DESTDIR $DESTDIR$CWD/$ENTRY >/dev/null; then
 			EXIT=1
 			echo "	$ENTRY contains the fake destdir."


More information about the Midnightbsd-cvs mailing list