summaryrefslogtreecommitdiff
path: root/pkgtools/pkgdiff/files/mkpatches.pl
diff options
context:
space:
mode:
authorabs <abs>2001-05-24 17:02:44 +0000
committerabs <abs>2001-05-24 17:02:44 +0000
commit37be3de5e2525a04d331e221fbc976c2982826d8 (patch)
treefc14126c096eb364e0ac4748394916f20cb7c2f2 /pkgtools/pkgdiff/files/mkpatches.pl
parent8e3c18fd3733715115848091297bb479ed264aa7 (diff)
downloadpkgsrc-37be3de5e2525a04d331e221fbc976c2982826d8.tar.gz
Update pkgdiff to 0.100
if pkgdiff failed due to a problem with RCS ids, mkpatches would save the failure message as a patch. Change to abort if pkgdiff has a non zero exit (with the pkgdiff output). Also add a '-v' flag to indicate which .orig file is being associated with which patchfile as processed.
Diffstat (limited to 'pkgtools/pkgdiff/files/mkpatches.pl')
-rwxr-xr-xpkgtools/pkgdiff/files/mkpatches.pl12
1 files changed, 10 insertions, 2 deletions
diff --git a/pkgtools/pkgdiff/files/mkpatches.pl b/pkgtools/pkgdiff/files/mkpatches.pl
index 2e9dfda2a64..4214d34b322 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.4 2001/03/31 17:24:03 skrll Exp $
+# $NetBSD: mkpatches.pl,v 1.5 2001/05/24 17:02:44 abs Exp $
#
# mkpatches: creates a set of patches patch-aa, patch-ab, ...
# in work/.newpatches by looking for *.orig files in and below
@@ -34,7 +34,7 @@ sub create_patchdir {
# read command line arguments
-getopts('d:h');
+getopts('d:hv');
if ($opt_h) {
($prog) = ($0 =~ /([^\/]+)$/);
@@ -42,6 +42,7 @@ if ($opt_h) {
usage: $prog [-d output-directory]
-d dirname directory to put the resulting patches into;
defaults to \$WRKDIR/.newpatches
+ -v verbose - list .orig files as processed
EOF
exit 0;
};
@@ -87,7 +88,14 @@ foreach (sort <handle>) {
if ( -f $complete ) {
$patchfile = ("aa".."zz")[$l];
$patchfile =~ s/^/patch-/;
+ if ($opt_v) {
+ print "$patchfile -> $complete\n";
+ }
$diff=`pkgdiff $old $new`;
+ if ( $? ) {
+ print "$old\n$diff\n";
+ exit 1;
+ }
if ( "$diff" eq "" ) {
print ("$new and $old don't differ\n");
} else {