Small guide on how to work with .patchset files

Hello folks.

While updating recipes over HaikuPorts, sometimes the .patchset files do not apply cleanly. Not a big issue for small patchsets, as one can more or less just edit the needed files by hand, but for bigger ones… a better approach is needed.

After doing it in many (all?) the “wrong” ways, too many times, I finally found something that not only works for me, but that also makes the most sense (letting git do most of the work for us).

I’ve used this process when updating a couple of Python recipes already, but I kept forgetting this or that step, so today, while working on updating the git recipe to version 2.45.1, I wrote down step by step what I did.

The result is posted (for now) as a the following gist: Updating HaikuPorter .recipes (and what to do when applying the .patchset fails)..

It might help some newbie HaikuPorter (like myself), or… if I’m just talking nonsense, provoke the ire of the more knowledgeable devs, and getting schooled on how to do it properly :smiley: .

After some feedback/fixes, this (or hopefully a better) guide might be added to HaikuPorts’ wiki, perhaps?

Take care.

9 Likes

Thanks for sharing this! What I usually did was to compare the patches with the source files, manually make the changes at the new locations in the source, then run haikuporter -e to generate a new patch.

1 Like

Nice write down, personally got lost half way (if not earlier), I guess I’m on the path like @win8linux does, run the patchset, see what fails, nuke that out untill the patchset applies, then start manually patching the missing parts.
On the overcomplicated patches I ask the maintainer if they can have a look at bumping version. :wink:

:smiley:

Yeah… I can see how having included all those commands outputs can result in utter confusion. I guess I could try to find a middle ground between the TL;DR, and the long-winded version.

But hey… at least I won’t forget what commands to use now :stuck_out_tongue:

And yes… this process makes the most sense for big patchsets with more than just one small change needed. But… I hope to get more used to it, and use it even for the simpler stuff.

1 Like

This looks like a very good guide. Perhaps we might move it to the HaikuPorts Wiki?

3 Likes

I hope to catch some more misspellings and grammar mistakes in the next few revisions, and the text assumes the reader is already familiar enough with HaikuPorter and .recipes, but… in any case… to any of the HaikuPorts maintainers… feel free to use it as you see it fit!

4 Likes