[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Advice on use of patch system while hacking



On Mon, 2012-04-02 at 00:20 +0200, Gergely Nagy wrote:
> Ross Boylan <ross@biostat.ucsf.edu> writes:
> 
> > Short version:
> >
> > What's the best way to work with a dpatch-based package developing code
> > that will likely take many smallish iterations to get right?
> 
> As the other reply said: the best way is not to.
> 
> The long version of the same answer: dpatch is not a VCS, was never
> meant to be. The best way to work with it, is to ignore it until you
> really can't ignore it anymore.
> 
> Which, in this case, probably means running debian/rules build over and
> over again, until you have something that works. 
I thought debian/rules build would invoke the same patch logic, but I
tried it and it didn't.  Thanks for the tip.
> I wouldn't bother
> building a package, just the binaries (assuming it has a sane build
> system, where, if you modify a file, it will rebuild it correctly), and
> either run the thing from the build tree if that is supported, or copy
> them to the appropriate place by hand. Or, as you considered below, even
> edit the installed file, if that's more convenient.
> 
> > My patches also edit debian/changelog; I think that is an error and I
> > should simply edit the changelog without making a patch for it, or for
> > anything under debian.  Is the rule "no patches for changes under
> > debian/" correct?
> 
> Yep, that is correct.
Thank you for the confirmation.
> 
> > At least for awhile my changes will likely be focussed in one python
> > file; I am considering simply editing it in place (where it's installed
> > in the system) as a way of getting it right.  Would that be
> > reasonable?
> 
> I do that fairly often.
I installed a symlink and/or fed test input directly into the new code
(it's designed to work in a sequence of filters).  This is ideal, since
it involves almost no building/packaging (I still need to create the
derived code file from the original nw file).

I've now got python syntax parsing sort of working, and the other part,
mapping line and column numbers for errors in derived files to locations
in the original .nw source, was already working.

I'll still have some cleanup to do when I want to make some patches for
real.  As I said, I can probably figure out how to do it, though any
tips would be great.

Ross


Reply to: