You are not logged in.

#1 2019-04-30 19:52:16

f1she3
Member
Registered: 2019-01-05
Posts: 8

How to chain multiples patches ?

Hello !

I'm maintaining the following packages dwm-keycodes and st-alpha which are famous suckless programms patched for my own needs.
I would like to go further and create packages where anybody can just set the desired patches (directly in the PKGBUILD ?) and just create their custom package, and the PKGBUILD takes care of everything. One problem I have is that some patches are in conflict with each other, which blocks the automation of the process.

Do you guys know any tool / method to avoid this ? For example, a tool that "understands" what patch 1 does, and automaticaly regenerates patch 2 so that the patches can be chained ?

Example :
----
File.txt :

foo
bar

----
patch1.diff :

foo
bar
+foobar

----
patch2.diff :

foo
bar
+barfoo

Here if I apply patch1 then patch2, I will get a conflict, whereas it just need patch or whatever tool to be aware of what previous patches did, to get for example :

----
patch-combined.diff :

foo
bar
+foobar
+barfoo

(Or an updated version of patch2)

Hope my problem is clear, I have thought of applying patches separately in different folders than

merge

all the files of these folders, but I hope there's a better solution smile

Thanks for reading !

-- f1she3


-- fishe3 - Fool me once --

Offline

#2 2019-05-03 17:00:23

Mortimer Houghton
Member
Registered: 2014-09-28
Posts: 85

Re: How to chain multiples patches ?

Have you tried using Quilt?  Here is a tutorial (pdf file)

Offline

#3 2019-05-06 20:43:10

f1she3
Member
Registered: 2019-01-05
Posts: 8

Re: How to chain multiples patches ?

Hi, thanks for your answer and sorry for the delay, I'll have a look as soon as I got a bit of time, thanks for the ressource wink


-- fishe3 - Fool me once --

Offline

Board footer

Powered by FluxBB