[CentOS] rpm - diff and patch updating

Tue Jun 15 15:51:56 UTC 2010
Frank Cox <theatre at sasktel.net>

On Tue, 2010-06-15 at 02:44 -0700, John Doe wrote:
> I am afraid patch is not able to auto-magicaly adapt an old patch to a
> heavily modified file...

That's what I was afraid of.  I was hoping, however, that there might be
some way to verify that everything in the patch has now been done in the
new version.  My best idea on that score is to inspect the contents of
the old diff and the new diff to make sure that they are the same length
and refer to the same stuff.

> Did your manual experimentation involved any "fuzzy logic", pattern
> recognition 
> or code interpretation...?

I didn't think so, but perhaps my idea of "fuzzy" is different than the
computer's.  It's simply a matter of finding a reference to dancing
zebras and changing it to waltzing giraffes.  In the one patch that I
have re-created so far, the two lines that need to be changed appeared
to be the same in both the old and new version of the program, but their
positions in the file are different -- the change is now on line 165
instead of line 142 and so on.

> Maybe check http://en.wikipedia.org/wiki/Patch_(Unix)#Advanced_diffs

The original patch files appear to already be unified diffs.

I guess I'll just have to bite the bullet and rewrite some parts of this
thing manually to match the old patch files.  My major concern is that
I'll get lost in the woods and miss something; hopefully comparing the
old patch files to a new diff will allow me to check that.

-- 
MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com