summaryrefslogtreecommitdiff
path: root/pkgtools/pkgdiff
diff options
context:
space:
mode:
authorwiz <wiz>2008-11-05 23:18:18 +0000
committerwiz <wiz>2008-11-05 23:18:18 +0000
commit1aa3941d030e7bc34091065275984ea3fc52e2d4 (patch)
treec94df8cf3fbde4134fcd30f17854aa161a075483 /pkgtools/pkgdiff
parent6a52e1b214540b228651637c4a7169cf0ee18e31 (diff)
downloadpkgsrc-1aa3941d030e7bc34091065275984ea3fc52e2d4.tar.gz
Ignore more uninteresting output.
Tries to address PR 39291. Welcome to 0.121.
Diffstat (limited to 'pkgtools/pkgdiff')
-rw-r--r--pkgtools/pkgdiff/Makefile4
-rwxr-xr-xpkgtools/pkgdiff/files/patchdiff.pl21
2 files changed, 20 insertions, 5 deletions
diff --git a/pkgtools/pkgdiff/Makefile b/pkgtools/pkgdiff/Makefile
index 3d9ce4cbea6..6cc5716c28e 100644
--- a/pkgtools/pkgdiff/Makefile
+++ b/pkgtools/pkgdiff/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.65 2008/02/16 22:21:35 apb Exp $
+# $NetBSD: Makefile,v 1.66 2008/11/05 23:18:18 wiz Exp $
#
-DISTNAME= pkgdiff-0.120
+DISTNAME= pkgdiff-0.121
CATEGORIES= pkgtools devel
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/pkgtools/pkgdiff/files/patchdiff.pl b/pkgtools/pkgdiff/files/patchdiff.pl
index 2aab500c4fa..e03eaa0e370 100755
--- a/pkgtools/pkgdiff/files/patchdiff.pl
+++ b/pkgtools/pkgdiff/files/patchdiff.pl
@@ -1,6 +1,6 @@
#!@PERL5@
#
-# $NetBSD: patchdiff.pl,v 1.9 2008/02/16 22:21:35 apb Exp $
+# $NetBSD: patchdiff.pl,v 1.10 2008/11/05 23:18:18 wiz Exp $
#
# patchdiff: compares a set of patches patch-aa, patch-ab, ... in
# $WRKDIR/.newpatches in the with another set in patches.
@@ -96,8 +96,23 @@ foreach $patch (keys%new) {
if (defined($orig{$patch})) {
# system("diff",$orig{$patch},$new{$patch});
$diff=`diff $orig{$patch} $new{$patch}`;
- $diff=~s/^\dc\d\n..\$[N]etBSD.*\$\n---\n..\$[N]etBSD.*\$\n//m;
- $diff=~s/^\dc\d\n..\+\+\+.*\n---\n..\+\+\+.*\n//m;
+ # the following regex try to eliminate uninteresting differences
+ # The general structure of the diffs-to-be-removed is:
+ # 25c25
+ # < --- something.orig 2008-08-08 08:08
+ # ---
+ # > --- something.orig 2008-08-08 18:08
+ #
+ # In particular, remove hunks with:
+ # . NetBSD RCS Id tag differences
+ $diff=~s/^\d+c\d+\n..\$[N]etBSD.*\$\n---\n..\$[N]etBSD.*\$\n//m;
+ # . only the name or date of the output file changed
+ $diff=~s/^\d+c\d+\n..\+\+\+.*\n---\n..\+\+\+.*\n//m;
+ # . only the name or date of the input file changed
+ $diff=~s/^\d+c\d+\n.\s---\s.*\.orig\s.*\n---\n.\s---\s.*\n//m;
+ $diff=~s/^\d+c\d+\n.\s---\s.*\n---\n.\s---\s.*\.orig\s.*\n//m;
+ # . only line numbers changed
+ $diff=~s/^\d+c\d+\n.\s@@\s.*\s@@.*\n---\n.\s@@\s.*\s@@.*\n//mg;
if ($diff) {
print "Comparing $orig{$patch} to $new{$patch}\n$diff";
}