Bug 5955

Summary: Enhance PATCHTOOL = "git" to be able to pop off patch series
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Jonathan Liu <net147>
Component: coreAssignee: Unassigned <unassigned>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: Medium CC: bluelightning, meta.mr.watcher, meta.watcher, pavel, richard.purdie, sgw
Version: 1.6   
Target Milestone: Future   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
Patch for meta-qt5 that doesn't build successfully
none
Python backtrace none

Description Jonathan Liu 2014-03-12 21:39:32 UTC
Created attachment 1811 [details]
Patch for meta-qt5 that doesn't build successfully

Fails with a Python exception:

File: '/home/build/git/poky/build/../meta/lib/oe/patch.py', lineno: 112, function: _removePatch
     0108:
     0109:    def _removePatch(self, p):
     0110:        patch = {}
     0111:        patch['file'] = p.split(",")[0]
 *** 0112:        patch['strippath'] = p.split(",")[1]
     0113:        self._applypatch(patch, False, True)
     0114:
     0115:    def _removePatchFile(self, all = False):
     0116:        if not os.path.exists(self.seriespath):
Exception: IndexError: list index out of range
Comment 1 Jonathan Liu 2014-03-12 21:40:01 UTC
Created attachment 1812 [details]
Python backtrace
Comment 2 Richard Purdie 2014-03-26 17:16:30 UTC
Was this with master or dora? I tried applying a binary git diff patch on master and it worked...
Comment 3 Richard Purdie 2014-03-26 17:29:22 UTC
I tried your example and it also works.

I think the bigger problem is that you can't clean these patches off, so if you change the patch set, there is no series file to pop the patches off with so we can attempt a new set?
Comment 4 Richard Purdie 2014-03-28 16:35:18 UTC
Retargetting this bug at the realy problem - that the git patchtool support is unable to "unapply" a patch series in the same way quilt can. Attempts to modify the patch series result in strange errors if it tries to do that.

This has never been supported as far as I can tell so marking as an enhancement.
Comment 5 Richard Purdie 2026-07-09 15:25:35 UTC
We could use git notes as a way to store the needed information to unapply in a similar way to devtool does in some cases