summaryrefslogtreecommitdiff
path: root/pkgtools/pkgdiff
diff options
context:
space:
mode:
authorseb <seb>2005-08-02 12:16:19 +0000
committerseb <seb>2005-08-02 12:16:19 +0000
commit322f3e730d099f27ddf1713b02c6139806798b1a (patch)
treeaa6bc9eec5d5ceb0a4e0655991b970b0a5f30317 /pkgtools/pkgdiff
parent6c306c703d081f847f14888fcb3425eeebbbadf5 (diff)
downloadpkgsrc-322f3e730d099f27ddf1713b02c6139806798b1a.tar.gz
Update to version 0.118: pkgdiff fix and tuning.
Fix the automagic tuning of the number of unified diff context lines. It was broken since previous commit to files/pkgdiff. Also arguments '-u' and '-U NUM' to GNU diffutils 2.8.1, as seen in NetBSD 2.0_STABLE and current, are not intended to be used together. Hence only '-U NUM' is now specified. I did not reverted to the '-u -NUM' form used before as it seems undesirable. Please note that if PKGDIFF_FMT is specified in the environment, for testing or debugging purposes, we skip the automagic tuning of the number of unified diff context lines. The user probably wants to try another diff format, as suggested in the commit log of revision 1.12 of files/pkgdiff. So there is no point in adding '-U NUM' to PKGDIFF_FMT: it may just not work. See: $ diff -c -U 1 /dev/null /dev/null diff: conflicting output style options diff: Try `diff --help' for more information. While here save a few basename(1) runs.
Diffstat (limited to 'pkgtools/pkgdiff')
-rw-r--r--pkgtools/pkgdiff/Makefile4
-rwxr-xr-xpkgtools/pkgdiff/files/pkgdiff13
2 files changed, 11 insertions, 6 deletions
diff --git a/pkgtools/pkgdiff/Makefile b/pkgtools/pkgdiff/Makefile
index 466b8dd0d06..2df772b3ce4 100644
--- a/pkgtools/pkgdiff/Makefile
+++ b/pkgtools/pkgdiff/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.56 2005/07/16 19:10:40 jlam Exp $
+# $NetBSD: Makefile,v 1.57 2005/08/02 12:16:19 seb Exp $
#
-DISTNAME= pkgdiff-0.117
+DISTNAME= pkgdiff-0.118
CATEGORIES= pkgtools devel
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/pkgtools/pkgdiff/files/pkgdiff b/pkgtools/pkgdiff/files/pkgdiff
index c0f96399584..f2f62b4abf8 100755
--- a/pkgtools/pkgdiff/files/pkgdiff
+++ b/pkgtools/pkgdiff/files/pkgdiff
@@ -1,6 +1,6 @@
#!@SH@
#
-# $NetBSD: pkgdiff,v 1.15 2005/05/21 01:24:34 rh Exp $
+# $NetBSD: pkgdiff,v 1.16 2005/08/02 12:16:19 seb Exp $
#
# Usage: pkgdiff newfile
# pkgdiff oldfile newfile
@@ -26,9 +26,10 @@ else
old="$1"
new="$2"
fi
+basename_new="`basename $new`"
dodiff() {
- case x"`basename $new`" in
+ case x"$basename_new" in
xconfigure)
@DIFF@ -I '\(echo .*as_me:[0-9][0-9]*:\|echo .*configure:[0-9][0-9]*:\|line [0-9][0-9]* "configure\)' $*
;;
@@ -37,9 +38,10 @@ dodiff() {
esac
}
+case x"$PKGDIFF_FMT" in x)
lines=3
-: ${PKGDIFF_FMT:=-u -p -U $lines}
-while [ `dodiff "$PKGDIFF_FMT" "$old" "$new" | egrep -c '\\$(NetBSD|Author|Date|Header|Id|Locker|Log|Name|RCSfile|Revision|Source|State)(:.*)?\\$'` != 0 ]
+PKGDIFF_FMT="-p"
+while [ `dodiff "$PKGDIFF_FMT" -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
@@ -47,6 +49,9 @@ do
exit 1
fi
done
+PKGDIFF_FMT="${PKGDIFF_FMT} -U $lines"
+;;
+esac # PKGDIFF_FMT unset or null
if dodiff -q "$PKGDIFF_FMT" "$old" "$new" > /dev/null
then