Bug 125840 - PATCH to ports-mgmt/portupdate-scan
Summary: PATCH to ports-mgmt/portupdate-scan
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Beech Rintoul
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-21 22:00 UTC by alex
Modified: 2008-07-24 19:30 UTC (History)
0 users

See Also:


Attachments
file.diff (693 bytes, patch)
2008-07-21 22:00 UTC, alex
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description alex 2008-07-21 22:00:07 UTC
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.

Fix: PORTNAME=      portupdate-scan
-PORTVERSION=   0.2
+PORTVERSION=   0.3
 CATEGORIES=    ports-mgmt
 MASTER_SITES=  # none
 DISTFILES=     # none


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";--P32QO7CVQF0PCjwZ2GC5ndmsTzC6KI5mf3QS5PkGdVLVxzvc
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

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.
How-To-Repeat: N/A
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2008-07-21 22:00:17 UTC
Class Changed
From-To: sw-bug->maintainer-update

Fix category (submitter is maintainer) (via the GNATS Auto Assign Tool)
Comment 2 Beech Rintoul freebsd_committer freebsd_triage 2008-07-22 05:08:57 UTC
Responsible Changed
From-To: freebsd-ports-bugs->beech

I'll take it
Comment 3 dfilter service freebsd_committer freebsd_triage 2008-07-24 19:18:17 UTC
beech       2008-07-24 18:18:03 UTC

  FreeBSD ports repository

  Modified files:
    ports-mgmt/portupdate-scan Makefile 
    ports-mgmt/portupdate-scan/src portupdate-scan 
  Log:
  - 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)
  
  Revision  Changes    Path
  1.3       +1 -1      ports/ports-mgmt/portupdate-scan/Makefile
  1.3       +8 -5      ports/ports-mgmt/portupdate-scan/src/portupdate-scan
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 4 Beech Rintoul freebsd_committer freebsd_triage 2008-07-24 19:18:23 UTC
State Changed
From-To: open->closed

Committed, Thanks! 

Note: In the future please roll your diffs so they apply from  
the base of the port itself, not from /usr/ports/foo, thanks.