Bug 12397

Summary: patch_do_patch fails to detect patch failure
Product: [Build System, Metadata & Runtime] Meta-yocto Reporter: Thomas Epperson <thomas.epperson>
Component: meta-yoctoAssignee: Ross Burton <ross.burton>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: Medium+ CC: poky.bs.watcher, poky.watcher, thomas.epperson
Version: unspecified   
Target Milestone: 2.5 M2   
Hardware: Other   
OS: arm   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Thomas Epperson 2017-12-05 18:14:51 UTC
I'm using the krogoth branch of yocto poky.
My manifest is https://github.com/uglyoldbob/yocto-manifest

patch_do_patch tells me that python function do_patch finished. No error appears in the log.do_patch

My recipe is https://github.com/uglyoldbob/oe-custom/blob/verdex/recipes-bsp/u-boot/u-boot-verdex_1.2.0.bb

A scan through tmp/work/armv5e-poky-linux-gnueabi/u-boot-verdex/1.2.0-r7/git shows me the patch has not changed any files.

Running "bitbake -f -c patch u-boot-verdex" properly applies the patch and actually modifies the source code.

Running the resulting u-boot binary reflects the source code as it appears in tmp/work/armv5e-poky-linux-gnueabi/u-boot-verdex/1.2.0-r7/git, both when the patch is actually applied vs not applied.

Here is a rundown of what I see.
https://pastebin.com/BNuCavSP

Modifying or even removing the "FILESEXTRAPATHS_prepend" line has no effect.
Adding ";branch=master" to the git line also has no effect.
Comment 1 Thomas Epperson 2017-12-06 18:38:21 UTC
It seems the patches folder present in the SRC_URI git repository (https://github.com/ashcharles/verdex-uboot/tree/master/patches) is responsible for causing the problem.
Quilt tries to remove all patches, removes none, then tries to apply the non-existant add-gumstix-board-to-build.patch, notices it does not exist, and instead applies an empty patch and then returns success.
Comment 2 Thomas Epperson 2017-12-07 14:28:04 UTC
I have found a potential fix.
I have a pastebin of a patch

https://pastebin.com/wRz3D8zZ
Comment 3 Ross Burton 2017-12-07 16:01:21 UTC
The proper fix is to stop using $S/patches as a holding place for patches, so marking this as a duplicate.

*** This bug has been marked as a duplicate of bug 9982 ***