Wed Nov 5 23:18:18 2008 UTC ()
Ignore more uninteresting output.
Tries to address PR 39291.

Welcome to 0.121.


(wiz)
diff -r1.65 -r1.66 pkgsrc/pkgtools/pkgdiff/Makefile
diff -r1.9 -r1.10 pkgsrc/pkgtools/pkgdiff/files/patchdiff.pl

cvs diff -r1.65 -r1.66 pkgsrc/pkgtools/pkgdiff/Makefile (expand / switch to unified diff)

--- pkgsrc/pkgtools/pkgdiff/Makefile 2008/02/16 22:21:35 1.65
+++ pkgsrc/pkgtools/pkgdiff/Makefile 2008/11/05 23:18:18 1.66
@@ -1,17 +1,17 @@ @@ -1,17 +1,17 @@
1# $NetBSD: Makefile,v 1.65 2008/02/16 22:21:35 apb Exp $ 1# $NetBSD: Makefile,v 1.66 2008/11/05 23:18:18 wiz Exp $
2# 2#
3 3
4DISTNAME= pkgdiff-0.120 4DISTNAME= pkgdiff-0.121
5CATEGORIES= pkgtools devel 5CATEGORIES= pkgtools devel
6MASTER_SITES= # empty 6MASTER_SITES= # empty
7DISTFILES= # empty 7DISTFILES= # empty
8 8
9MAINTAINER= wiz@NetBSD.org 9MAINTAINER= wiz@NetBSD.org
10HOMEPAGE= ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/doc/pkgsrc.html 10HOMEPAGE= ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/doc/pkgsrc.html
11COMMENT= Tools to create, maintain and send back patches for pkgsrc 11COMMENT= Tools to create, maintain and send back patches for pkgsrc
12 12
13PKG_INSTALLATION_TYPES= overwrite pkgviews 13PKG_INSTALLATION_TYPES= overwrite pkgviews
14PKG_DESTDIR_SUPPORT= user-destdir 14PKG_DESTDIR_SUPPORT= user-destdir
15 15
16EXTRACT_ONLY= # empty 16EXTRACT_ONLY= # empty
17NO_CHECKSUM= yes 17NO_CHECKSUM= yes

cvs diff -r1.9 -r1.10 pkgsrc/pkgtools/pkgdiff/files/patchdiff.pl (expand / switch to unified diff)

--- pkgsrc/pkgtools/pkgdiff/files/patchdiff.pl 2008/02/16 22:21:35 1.9
+++ pkgsrc/pkgtools/pkgdiff/files/patchdiff.pl 2008/11/05 23:18:18 1.10
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1#!@PERL5@ 1#!@PERL5@
2# 2#
3# $NetBSD: patchdiff.pl,v 1.9 2008/02/16 22:21:35 apb Exp $ 3# $NetBSD: patchdiff.pl,v 1.10 2008/11/05 23:18:18 wiz Exp $
4# 4#
5# patchdiff: compares a set of patches patch-aa, patch-ab, ... in 5# patchdiff: compares a set of patches patch-aa, patch-ab, ... in
6# $WRKDIR/.newpatches in the with another set in patches. 6# $WRKDIR/.newpatches in the with another set in patches.
7# 7#
8# Copyright (c) 2000 by Dieter Baron <dillo@giga.or.at> and 8# Copyright (c) 2000 by Dieter Baron <dillo@giga.or.at> and
9# Thomas Klausner <wiz@NetBSD.org>  9# Thomas Klausner <wiz@NetBSD.org>
10# All Rights Reserved. Absolutely no warranty.  10# All Rights Reserved. Absolutely no warranty.
11 11
12use Getopt::Std; 12use Getopt::Std;
13use Cwd; 13use Cwd;
14use File::Spec; 14use File::Spec;
15 15
16my $oldpatchdir, $newpatchdir; 16my $oldpatchdir, $newpatchdir;
@@ -86,22 +86,37 @@ if ( ! -d $oldpatchdir) { @@ -86,22 +86,37 @@ if ( ! -d $oldpatchdir) {
86if ( ! -d $newpatchdir ) { 86if ( ! -d $newpatchdir ) {
87 print "No new patches found (directory $newpatchdir not found)\n"; 87 print "No new patches found (directory $newpatchdir not found)\n";
88 exit(0); 88 exit(0);
89} 89}
90putinhash(\%orig,"$oldpatchdir/patch-*"); 90putinhash(\%orig,"$oldpatchdir/patch-*");
91putinhash(\%new,"$newpatchdir/patch-*"); 91putinhash(\%new,"$newpatchdir/patch-*");
92foreach $patch (keys%orig) { 92foreach $patch (keys%orig) {
93 print "Only in old: $orig{$patch} ($patch)\n" unless defined($new{$patch}); 93 print "Only in old: $orig{$patch} ($patch)\n" unless defined($new{$patch});
94} 94}
95foreach $patch (keys%new) { 95foreach $patch (keys%new) {
96 if (defined($orig{$patch})) { 96 if (defined($orig{$patch})) {
97# system("diff",$orig{$patch},$new{$patch}); 97# system("diff",$orig{$patch},$new{$patch});
98 $diff=`diff $orig{$patch} $new{$patch}`; 98 $diff=`diff $orig{$patch} $new{$patch}`;
99 $diff=~s/^\dc\d\n..\$[N]etBSD.*\$\n---\n..\$[N]etBSD.*\$\n//m; 99 # the following regex try to eliminate uninteresting differences
100 $diff=~s/^\dc\d\n..\+\+\+.*\n---\n..\+\+\+.*\n//m; 100 # The general structure of the diffs-to-be-removed is:
 101 # 25c25
 102 # < --- something.orig 2008-08-08 08:08
 103 # ---
 104 # > --- something.orig 2008-08-08 18:08
 105 #
 106 # In particular, remove hunks with:
 107 # . NetBSD RCS Id tag differences
 108 $diff=~s/^\d+c\d+\n..\$[N]etBSD.*\$\n---\n..\$[N]etBSD.*\$\n//m;
 109 # . only the name or date of the output file changed
 110 $diff=~s/^\d+c\d+\n..\+\+\+.*\n---\n..\+\+\+.*\n//m;
 111 # . only the name or date of the input file changed
 112 $diff=~s/^\d+c\d+\n.\s---\s.*\.orig\s.*\n---\n.\s---\s.*\n//m;
 113 $diff=~s/^\d+c\d+\n.\s---\s.*\n---\n.\s---\s.*\.orig\s.*\n//m;
 114 # . only line numbers changed
 115 $diff=~s/^\d+c\d+\n.\s@@\s.*\s@@.*\n---\n.\s@@\s.*\s@@.*\n//mg;
101 if ($diff) { 116 if ($diff) {
102 print "Comparing $orig{$patch} to $new{$patch}\n$diff"; 117 print "Comparing $orig{$patch} to $new{$patch}\n$diff";
103 } 118 }
104 } else { 119 } else {
105 print "Only in new: $new{$patch} ($patch)\n"  120 print "Only in new: $new{$patch} ($patch)\n"
106 } 121 }
107} 122}