diff options
author | wiz <wiz> | 2000-07-01 02:38:55 +0000 |
---|---|---|
committer | wiz <wiz> | 2000-07-01 02:38:55 +0000 |
commit | 472ec7f457cbd02126fe03f6201088926d4dcd8f (patch) | |
tree | 708b1f5f34c7325f1af0fdd7cf1ba92671e66a94 | |
parent | c7eb5ac81823d97be9ea20c5606a0704c387a565 (diff) | |
download | pkgsrc-472ec7f457cbd02126fe03f6201088926d4dcd8f.tar.gz |
pkgdiff now only generates output at all if the files differ.
mkpatches doesn't generate empty patches, and warns if name and name.orig
don't differ.
Bump version to 0.91.
-rw-r--r-- | pkgtools/pkgdiff/Makefile | 4 | ||||
-rwxr-xr-x | pkgtools/pkgdiff/files/mkpatches.pl | 9 | ||||
-rwxr-xr-x | pkgtools/pkgdiff/files/pkgdiff | 18 |
3 files changed, 22 insertions, 9 deletions
diff --git a/pkgtools/pkgdiff/Makefile b/pkgtools/pkgdiff/Makefile index 6ec3b378c2c..1fb2077973e 100644 --- a/pkgtools/pkgdiff/Makefile +++ b/pkgtools/pkgdiff/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.1.1.1 2000/06/28 01:42:42 wiz Exp $ +# $NetBSD: Makefile,v 1.2 2000/07/01 02:38:55 wiz Exp $ # -DISTNAME= pkgdiff-0.90 +DISTNAME= pkgdiff-0.91 CATEGORIES= pkgtools devel MASTER_SITES= # empty DISTFILES= # empty diff --git a/pkgtools/pkgdiff/files/mkpatches.pl b/pkgtools/pkgdiff/files/mkpatches.pl index ac5118c2d06..7c8e2a90629 100755 --- a/pkgtools/pkgdiff/files/mkpatches.pl +++ b/pkgtools/pkgdiff/files/mkpatches.pl @@ -1,6 +1,6 @@ #!@PREFIX@/bin/perl # -# $NetBSD: mkpatches.pl,v 1.1.1.1 2000/06/28 01:42:42 wiz Exp $ +# $NetBSD: mkpatches.pl,v 1.2 2000/07/01 02:38:56 wiz Exp $ # # mkpatches: creates a set of patches patch-aa, patch-ab, ... # in work/.newpatches by looking for *.orig files in and below @@ -87,7 +87,12 @@ while(<handle>) { if ( -f $complete ) { $patchfile = ("aa".."zz")[$l]; $patchfile =~ s/^/patch-/; - system("pkgdiff $path $complete > $patchdir/$patchfile"); + $diff=`pkgdiff $path $complete`; + if ( "$diff" eq "" ) { + print ("$complete and $path don't differ\n"); + } else { + system("pkgdiff $path $complete > $patchdir/$patchfile"); + } } else { print ("$complete doesn't exist, though $path does"); } diff --git a/pkgtools/pkgdiff/files/pkgdiff b/pkgtools/pkgdiff/files/pkgdiff index 22f08f9b420..27c1ab98ff7 100755 --- a/pkgtools/pkgdiff/files/pkgdiff +++ b/pkgtools/pkgdiff/files/pkgdiff @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: pkgdiff,v 1.1.1.1 2000/06/28 01:42:42 wiz Exp $ +# $NetBSD: pkgdiff,v 1.2 2000/07/01 02:38:56 wiz Exp $ # # Id: pkgdiff,v 1.4 2000/05/14 01:04:54 feyrer Exp feyrer # @@ -13,11 +13,14 @@ # All Rights Reserved. Absolutely no warranty. # -echo '$'NetBSD'$' -echo '' +if [ $# -le 1 ] +then + echo $0: need at least two arguments >&2 + exit 1; +fi lines=3 -while [ `diff -u -$lines $@ | egrep -c '\\$(NetBSD|Author|Date|Header|Id|Locker|Log|Name|RCSfile|Revision|Source|State)'` != 0 ] +while [ `diff -u -$lines "$@" | egrep -c '\\$(NetBSD|Author|Date|Header|Id|Locker|Log|Name|RCSfile|Revision|Source|State)'` != 0 ] do lines=`expr $lines - 1` if [ $lines = 0 ]; then @@ -26,4 +29,9 @@ do fi done -diff -u -$lines $@ +if ! diff -qu -$lines "$@" > /dev/null +then + echo '$'NetBSD'$' + echo '' + diff -u -$lines "$@" +fi |