Subject: Re: pkgdiff -- tools for easier pkgsrc patch creation and maintenance
To: None <tech-pkg@netbsd.org, packages@netbsd.org>
From: Brook Milligan <brook@biology.nmsu.edu>
List: tech-pkg
Date: 06/30/2000 08:51:20
   > mkpatches creates patches for a whole package (by using pkgdiff) -- it
   > finds the files it should diff by looking for files with an '.orig'
   > extension, so if you edit a file and want to use mkpatches later,
   > first make a backup of it with `cp -p file file.orig'. mkpatches
   > should be run from the packages main directory (pkgsrc/foo/bar), and
   > the patches are then saved in the directory $WRKDIR/.newpatches.

Another suggestion for improvement to this system (which is really
handy by the way) would be to skip diffs that are empty.

For example, suppose I create foo.orig file but eventually decide not
to edit foo (or revert my changes).  It would be nice if pkgdiff would
recognize that the diff is empty and not bother creating a patch.
Then developers don't have to worry about either deleting redundant
*.orig files or having empty patches.

I'm not enough of a perl wizard to know how to change pkgdiff, but
there must be a simple means of checking whether the $diff variable is
empty and skipping the rest of the processing (e.g., adding $NetBSD$,
...).

Cheers,
Brook