ports/125840: PATCH to ports-mgmt/portupdate-scan
Alex Stangl
alex at stangl.us
Mon Jul 21 21:00:07 UTC 2008
>Number: 125840
>Category: ports
>Synopsis: PATCH to ports-mgmt/portupdate-scan
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Jul 21 21:00:07 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Alex Stangl
>Release: FreeBSD 6.0
>Organization:
>Environment:
FreeBSD scout.stangl.us 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Thu Nov 3 09:36:13 UTC 2005 root at x64.samsco.home:/usr/obj/usr/src/sys/GENERIC i386
>Description:
Patch to ports-mgmt/portupdate-scan to deal with problems which have surfaced recently, parsing the files /usr/ports/MOVED and /usr/ports/UPDATING. MOVED had an extra blank line on the end for awhile, and the case of some of the UPDATING lines have changed (e.g., Author: instead of AUTHOR:). This patch allows portupdate-scan to tolerate these variances.
I don't have permission to commit this change to CVS myself.
>How-To-Repeat:
N/A
>Fix:
diff -ruN portupdate-scan-0.2/Makefile /usr/ports/ports-mgmt/portupdate-scan/Makefile
--- portupdate-scan-0.2/Makefile Mon Feb 4 09:26:19 2008
+++ /usr/ports/ports-mgmt/portupdate-scan/Makefile Mon Jul 21 15:35:58 2008
@@ -7,7 +7,7 @@
# This port is self contained in the files directory.
PORTNAME= portupdate-scan
-PORTVERSION= 0.2
+PORTVERSION= 0.3
CATEGORIES= ports-mgmt
MASTER_SITES= # none
DISTFILES= # none
diff -ruN portupdate-scan-0.2/src/portupdate-scan /usr/ports/ports-mgmt/portupdate-scan/src/portupdate-scan
--- portupdate-scan-0.2/src/portupdate-scan Mon Feb 4 09:26:20 2008
+++ /usr/ports/ports-mgmt/portupdate-scan/src/portupdate-scan Mon Jul 21 15:47:28 2008
@@ -19,7 +19,8 @@
# Intended to be used prior to upgrading ports
# Usage: portupdatescan [-dDhmuvV] [--help] [--version]
# Created: 2006/12/21 Alex Stangl
-# Last updated: 2008/02/04 Alex Stangl INDEX computation change from Tom Doherty
+# Updates: 2008/02/04 Alex Stangl INDEX computation change from Tom Doherty
+# 2008/07/21 Alex Stangl Tolerate problems w/ MOVED & UPDATING
use Text::ParseWords;
use Getopt::Std;
@@ -41,7 +42,7 @@
}
sub VERSION_MESSAGE() {
- print "portupdate-scan 0.1\n";
+ print "portupdate-scan 0.3\n";
}
# Fetch cmdline args, display usage if appropriate
@@ -82,10 +83,10 @@
my ($affects, $remainder, $line);
my $index = 0;
foreach $line (@_) {
- if ($line =~ /^\s*AFFECTS:/) {
+ if ($line =~ /^\s*AFFECTS:/i) {
$affects = $line;
$remainder = $index;
- } elsif ($affects and $line =~ /^\s*AUTHOR/) {
+ } elsif ($affects and $line =~ /^\s*AUTHOR/i) {
last;
} elsif ($affects) {
$affects .= $line;
@@ -317,7 +318,9 @@
open(MOVED, $movedFile) or die "Can't open $movedFile: $!";
while(<MOVED>) {
chomp;
- if ($_ !~ /^\s*#/) {
+ if ($_ =~ /^\s*$/) {
+ print "+ Ignoring MOVED line containing no non-whitespace chars.\n" if $opt{d};
+ } elsif ($_ !~ /^\s*#/) {
my ($from, $to) = ($_ =~ /^([^|]*)\|([^|]*)/)
or die "$_ is not a correctly formed MOVED line";
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list