summaryrefslogtreecommitdiff
path: root/pkgtools/pkgdiff
diff options
context:
space:
mode:
authorsbd <sbd@pkgsrc.org>2010-07-04 22:20:04 +0000
committersbd <sbd@pkgsrc.org>2010-07-04 22:20:04 +0000
commit68a57a8482e72581e7d96b2867ebcd9866065504 (patch)
treea1c572dd7006327310a7ffede50fe9e05d017465 /pkgtools/pkgdiff
parentcf095389bc2bd475ff817d12095fb6bb66d16548 (diff)
downloadpkgsrc-68a57a8482e72581e7d96b2867ebcd9866065504.tar.gz
Use a single pattern to match changes in the diff header so that a change to
the input timestamp/name _and_/or output timestamp _and_/or line numbers changes handled. update version number to 0.123
Diffstat (limited to 'pkgtools/pkgdiff')
-rw-r--r--pkgtools/pkgdiff/Makefile4
-rwxr-xr-xpkgtools/pkgdiff/files/patchdiff.pl13
2 files changed, 9 insertions, 8 deletions
diff --git a/pkgtools/pkgdiff/Makefile b/pkgtools/pkgdiff/Makefile
index 55141cef48e..8d6c84ed54b 100644
--- a/pkgtools/pkgdiff/Makefile
+++ b/pkgtools/pkgdiff/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.69 2009/12/10 20:26:33 abs Exp $
+# $NetBSD: Makefile,v 1.70 2010/07/04 22:20:04 sbd Exp $
#
-DISTNAME= pkgdiff-0.122
+DISTNAME= pkgdiff-0.123
CATEGORIES= pkgtools devel
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/pkgtools/pkgdiff/files/patchdiff.pl b/pkgtools/pkgdiff/files/patchdiff.pl
index be0073d858b..68d80560f91 100755
--- a/pkgtools/pkgdiff/files/patchdiff.pl
+++ b/pkgtools/pkgdiff/files/patchdiff.pl
@@ -1,6 +1,6 @@
#!@PERL5@
#
-# $NetBSD: patchdiff.pl,v 1.11 2010/07/04 22:18:28 sbd Exp $
+# $NetBSD: patchdiff.pl,v 1.12 2010/07/04 22:20:04 sbd Exp $
#
# patchdiff: compares a set of patches patch-aa, patch-ab, ... in
# $WRKDIR/.newpatches in the with another set in patches.
@@ -106,11 +106,12 @@ foreach $patch (keys%new) {
# 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;
+ # . the name of the input file changed
+ # (if the name of the output file has changed values in $orig{$patch}
+ # and $new{$patch} won't match so the files don't get compared)
+ # . time of the input and/or output file changed
+ # . line numbers changed
+ $diff=~s/^[\d,]+c[\d,]+\n(?:.\s---\s(:?\S*).*\n)?(?:.\s\+\+\+\s(\S*).*\n)?(?:.\s@@\s(?:.*)\s@@.*\n)?---\n(?:.\s---\s.*\n)?(?:.\s\+\+\+\s\1.*\n)?(?:.\s@@\s.*\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) {