Bug 7282

Summary: linux-yocto: accidentally skips patches
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Patrick Ohly <patrick.ohly>
Component: kernelAssignee: Bruce Ashfield <bruce.ashfield>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Medium CC: baogen.shang, bluelightning, bruce.ashfield, tom.zanussi
Version: 1.7   
Target Milestone: 1.9 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Patrick Ohly 2015-02-04 11:01:28 UTC
I just experienced an issue where a patch listed in SRC_URI of a linux-yocto_%.bbapend file was not applied, without any errors.

I tracked it down to the fact that one of the following patches in SRC_URI was already applied. For example, suppose SRC_URI="a b c" and "b" is already applied.

kgit-s2q when called via patchme -> kgit-meta/do_pending_patches() then finds "b" in the already applied patches, uses it as resume point and skips "a".

One could argue that none of the patches in SRC_URI should be already present, but I disagree. For example, a .bbappend file might add a new patch, then later the underlying kernel gets updated such that it contains the same patch.

My expectation is that the redundant patch (and only that patch) gets skipped (possibly with warning) or an error gets generated. I'd be fine with both.
Comment 1 Bruce Ashfield 2015-02-04 13:11:34 UTC
There's no easy way to do this, without validating each and every
patch in the branch, and that isn't something we will do.

The design is to locate a resume point, and resume from there. We
already have patch time issues on queues of 10k+ patches, and doing
individual patch application, detection and skipping isn't going to
be possible without significantly increasing the patch time.

This might be possible as an optional mode of the script's processing,
so I'm tagging this as an enhancement .. since it absolutely is not
a bug.
Comment 2 Bruce Ashfield 2015-02-06 16:39:55 UTC
To clarify. There are some updates to the tools that just came out that give us
the flexibility to trap this case as an error, and abort the patching phase. That will
make it clear to the user that the series is invalid.
Comment 3 Bruce Ashfield 2015-05-19 02:28:07 UTC
*** Bug 7788 has been marked as a duplicate of this bug. ***