Re: automated patch dependency and conflict tracking
Stefan Fiedler <[email protected]> Sun, 12 Mar 2006 18:39:10 +0100
| Newsgroups | gmane.linux.distributions.rock.devel |
|---|---|
| Message-ID | <[email protected]> |
Am Dienstag 14 Februar 2006 12:29 schrieb Benjamin Schieder: > On Mon, Feb 13, 2006 at 05:19:28PM +0100, Benjamin Schieder wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > Stefan Fiedler wrote: > > > [ patch-group and patch-report ] > > > > Hi Stefan. > > > > First, it's a very nice script and indeed helpful. > > > > But it would be even more helpful if it wouldn't just assume a sane > > environment and being called directly. > > > > Checks like > > > > if [ -z "`which lsdiff`" ] ; then > > echo "lsdiff not found!" >&2 > > echo "Please install the package 'patchutils'!" >&2 > > exit 1 > > fi > > > > would be nice :) > > Also, you should check for command line arguments being sane (like the > > existence of patches in the patchdir) as well as checking for -h --help > > -v --verbose switches. This is a good start for that: > > http://shellscripts.org/project/template > > Also, if your scripts would output the calls to 'patch' that are necessary > to apply the patches it would be even better :) > > Greetings, > Benjamin Hi Benjamin, thanks for your valuable feedback. First of all, Patch-Groups is now called Patch-Tester, and Patch-Report is called Patch-Summary. I think the new names better match the purpose of the scripts... I've uploaded new versions of the scripts to www.shellscripts.org with the following added features: both scripts: - parse options with GNU getopt (from util-linux) - perform sanity checks on options and the environment (e.g. missing programs) Patch-Tester: - exhaustive_dependency_test() now implements a non-recursive, easier to understand algorithm that should produce correct results in all cases - conflict_test() will note how to avoid conflicts between patches, if possible (e.g. if patches A and B apply independently and patch B applies after patch A was applied, but not vice versa). - unneeded code like combine() and patch group creation are removed, for simplicity's sake Patch-Summary: - now writes the appropriate, ordered patch calls to stdout, so "./Patch-Tester ; ./Patch-Summary > tmp.sh ; . tmp.sh > patch.log" is an easy way to apply a large set of patches to a tree, and to see which parts couldn't be made to apply. With best regards, Stefan Fiedler