ports/138774: Tools/bump_revision.pl incorrectly handled REVISION?=

Gerald Pfeifer gerald at FreeBSD.org
Sun Sep 13 00:30:04 UTC 2009


>Number:         138774
>Category:       ports
>Synopsis:       Tools/bump_revision.pl incorrectly handled REVISION?=
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep 13 00:30:03 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Gerald Pfeifer
>Release:        FreeBSD 7.2-RELEASE-p2 i386
>Organization:
>Environment:
>Description:
	This first happened in January when I chased PORTREVISIONs for
	all ports with USE_FORTRAN=yes.  I reported it by mail back then,
	yet just ran into this again so I had a look into the actual code.

	The problem is that for a port with PORTREVISION?=n, 
	bump_revision.pl will not bump n to n+1, but reset to 1.

	The bug is in extracting the version number properly, and it
	seems the one line patch below fixes it.

	Is this okay to commit?
>How-To-Repeat:
	I tested the patch both on math/fftw and lang/gcc34 to cover
	various cases.	
>Fix:
Index: bump_revision.pl
===================================================================
RCS file: /home/pcvs/ports/Tools/scripts/bump_revision.pl,v
retrieving revision 1.4
diff -u -3 -p -r1.4 bump_revision.pl
--- bump_revision.pl	7 Jan 2009 21:33:17 -0000	1.4
+++ bump_revision.pl	13 Sep 2009 00:18:39 -0000
@@ -46,7 +49,7 @@ sub bumpMakefile {
 
 	foreach my $line (@lines) {
 	    last if ($line =~ /^MAINTAINER/);
-	    $revision += $1 if ($line =~ /PORTREVISION??=[ \t]*(\d+)$/);
+	    $revision += $1 if ($line =~ /PORTREVISION\??=[ \t]*(\d+)$/);
 	}
 
 	my $printedrev = 0;
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list