Date: Sun, 13 Sep 2009 02:27:20 +0200 (CEST) From: Gerald Pfeifer <gerald@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/138774: Tools/bump_revision.pl incorrectly handled REVISION?= Message-ID: <200909130027.n8D0RK5Y017390@sputnik1.dbai.tuwien.ac.at> Resent-Message-ID: <200909130030.n8D0U3tw060904@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909130027.n8D0RK5Y017390>