aboutsummaryrefslogtreecommitdiff
path: root/ports-mgmt/portupdate-scan
diff options
context:
space:
mode:
authorBeech Rintoul <beech@FreeBSD.org>2008-07-24 18:18:03 +0000
committerBeech Rintoul <beech@FreeBSD.org>2008-07-24 18:18:03 +0000
commitc46d8b01121a048e35779c0c9f56b2f66d139e8e (patch)
treead9792b075874daf4506b2a725debdad12ae08ed /ports-mgmt/portupdate-scan
parent89c85416ec987bd6a9c85d856f3c3ed82a4e8cf5 (diff)
downloadports-c46d8b01121a048e35779c0c9f56b2f66d139e8e.tar.gz
ports-c46d8b01121a048e35779c0c9f56b2f66d139e8e.zip
- 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. PR: ports/125840 Submitted by: Alex Stangl <alex@stangl.us> (maintainer)
Notes
Notes: svn path=/head/; revision=217434
Diffstat (limited to 'ports-mgmt/portupdate-scan')
-rw-r--r--ports-mgmt/portupdate-scan/Makefile2
-rw-r--r--ports-mgmt/portupdate-scan/src/portupdate-scan13
2 files changed, 9 insertions, 6 deletions
diff --git a/ports-mgmt/portupdate-scan/Makefile b/ports-mgmt/portupdate-scan/Makefile
index 76583e466cce..3210dddacf5b 100644
--- a/ports-mgmt/portupdate-scan/Makefile
+++ b/ports-mgmt/portupdate-scan/Makefile
@@ -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 --git a/ports-mgmt/portupdate-scan/src/portupdate-scan b/ports-mgmt/portupdate-scan/src/portupdate-scan
index 00a48799a3c5..51b8c87bd643 100644
--- a/ports-mgmt/portupdate-scan/src/portupdate-scan
+++ b/ports-mgmt/portupdate-scan/src/portupdate-scan
@@ -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 @@ EOF
}
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 @@ sub processBlock(@) {
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 @@ MAIN:{
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";