You are not logged in.

#1 2012-07-21 08:03:58

W.F.Cody
Member
From: Ghent
Registered: 2010-11-18
Posts: 155

skipping failed patches without interrupting build() ?

Hi

Is there a way to make a PKGBUILD build() proceed when it encounters a failed patch and just ignore/skip that patch? Preferrably using "git am" as patching tool.

the reason I ask is that I am trying to package LLVMlinux and it contains a ton of patches but right now it blocks at the first one not applying cleanly.
By automatically skipping and printing out an error message, one could go back and adress those patches if needed.


My AUR packages
Any package of mine is up for grabs. If you think you could mantain it better - just contact me!

Offline

#2 2012-07-21 08:54:43

dolik.rce
Member
From: Czech republic
Registered: 2011-05-04
Posts: 43

Re: skipping failed patches without interrupting build() ?

patch <params> || echo "Patch xy failed"

But I think it is not really good idea...

Offline

#3 2012-07-21 08:57:57

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: skipping failed patches without interrupting build() ?

man PKGBUILD wrote:

BUILD() FUNCTION
In addition to the above directives, the optional build() function usually comprises the remainder of the PKGBUILD. This is directly sourced and executed by makepkg, so anything that bash or the system has available is available for use here. The function is run in bash -e mode, meaning any command that exits with a non-zero status will cause the function to exit.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2012-07-25 05:52:38

W.F.Cody
Member
From: Ghent
Registered: 2010-11-18
Posts: 155

Re: skipping failed patches without interrupting build() ?

Thankst for the tips! This helped with getting the build to run. I still need to provide some fixed patches to overwrite those that currently do not apply.

the older LLL linux kernel built nicely but there it was a fixed version which made patching less of a moving target.


My AUR packages
Any package of mine is up for grabs. If you think you could mantain it better - just contact me!

Offline

Board footer

Powered by FluxBB