From 559b7f04519bfe93a7fe6159108feee7353697b3 Mon Sep 17 00:00:00 2001 From: wiz Date: Sun, 10 Mar 2002 22:04:01 +0000 Subject: Make pkgdiff smarter re: configure patches: avoid most parts that only change the line number in the configure script. Mostly by Stoned Elipot, with slight changes by me. Bump to 0.104. --- pkgtools/pkgdiff/Makefile | 4 ++-- pkgtools/pkgdiff/files/pkgdiff | 18 ++++++++++++++---- 2 files changed, 16 insertions(+), 6 deletions(-) (limited to 'pkgtools') diff --git a/pkgtools/pkgdiff/Makefile b/pkgtools/pkgdiff/Makefile index c20a4b3bcda..7d99c73ca40 100644 --- a/pkgtools/pkgdiff/Makefile +++ b/pkgtools/pkgdiff/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.22 2001/12/15 20:25:39 agc Exp $ +# $NetBSD: Makefile,v 1.23 2002/03/10 22:04:01 wiz Exp $ # -DISTNAME= pkgdiff-0.103 +DISTNAME= pkgdiff-0.104 CATEGORIES= pkgtools devel MASTER_SITES= # empty DISTFILES= # empty diff --git a/pkgtools/pkgdiff/files/pkgdiff b/pkgtools/pkgdiff/files/pkgdiff index 50301c638b9..3943b43fcdc 100755 --- a/pkgtools/pkgdiff/files/pkgdiff +++ b/pkgtools/pkgdiff/files/pkgdiff @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: pkgdiff,v 1.5 2001/10/08 15:59:52 seb Exp $ +# $NetBSD: pkgdiff,v 1.6 2002/03/10 22:04:02 wiz Exp $ # # Usage: pkgdiff newfile # pkgdiff oldfile newfile @@ -27,8 +27,18 @@ else new="$2" fi +dodiff() { + case x$new in + xconfigure) + @DIFF@ -I '\(echo .*as_me:[0-9]+:\|echo .*configure:[0-9]+:\|line [0-9]+ \"configure\)' $* + ;; + *) + @DIFF@ $* + esac +} + lines=3 -while [ `@DIFF@ -u -$lines "$old" "$new" | egrep -c '\\$(NetBSD|Author|Date|Header|Id|Locker|Log|Name|RCSfile|Revision|Source|State)'` != 0 ] +while [ `dodiff -u -$lines "$old" "$new" | egrep -c '\\$(NetBSD|Author|Date|Header|Id|Locker|Log|Name|RCSfile|Revision|Source|State)'` != 0 ] do lines=`expr $lines - 1` if [ $lines = 0 ]; then @@ -37,7 +47,7 @@ do fi done -if @DIFF@ -qu -$lines "$old" "$new" > /dev/null +if dodiff -qu -$lines "$old" "$new" > /dev/null then : else @@ -45,5 +55,5 @@ else echo '' # Strip out the date on the +++ line to reduce needless # differences in regenerated patches - @DIFF@ -u -$lines "$old" "$new" | sed -e 's:^\(+++ [^ ]*\) .*:\1:' + dodiff -u -$lines "$old" "$new" | sed -e 's:^\(+++ [^ ]*\) .*:\1:' fi -- cgit v1.2.3