Bug 7018

Summary: archiver missing tasks between do_unpack and do_patch
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Hongxu Jia <hongxu.jia>
Component: coreAssignee: Hongxu Jia <hongxu.jia>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: liezhi.yang, meta.mr.watcher, meta.watcher, randy.macleod, richard.purdie, ross.burton, sgw
Version: 1.8   
Target Milestone: 3.2   
Hardware: x86   
OS: Multiple   
Whiteboard: Backport to 2.6.1
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Hongxu Jia 2014-12-03 07:54:29 UTC
While archiver inherited, we edit a recipe (such as gzip) to
insert four tasks between do_patch and do_unpack:
...
addtask test1 after do_unpack before do_patch
addtask test2 after do_unpack before do_test1
addtask test3 after do_test2 before do_test1
addtask test4 after do_test2 before do_test1
...

While building the recipe, the archiver will
missing these four task in do_unpack_and_patch.
Because it is hardcoded to execute do_unpach and do_patch,
did not consider the probable tasks between them.
...
    # The kernel source is ready after do_validate_branches
    if bb.data.inherits_class('kernel-yocto', d): 
        bb.build.exec_func('do_unpack', d)
        bb.build.exec_func('do_kernel_checkout', d)
        bb.build.exec_func('do_validate_branches', d)
    else:
        bb.build.exec_func('do_unpack', d)

    # Save the original source for creating the patches
    if d.getVarFlag('ARCHIVER_MODE', 'diff', True) == '1':
        src = d.getVar('S', True).rstrip('/')
        src_orig = '%s.orig' % src 
        oe.path.copytree(src, src_orig)
    bb.build.exec_func('do_patch', d)
...
Comment 1 Ross Burton 2015-10-08 15:45:52 UTC
Hongxu, I have memories of this patch but cant find it. Did this get merged or was the patch rejected?
Comment 2 Robert Yang 2015-10-09 02:32:36 UTC
(In reply to comment #1)
> Hongxu, I have memories of this patch but cant find it. Did this get merged
> or was the patch rejected?

Hongxu is blocked by other things recently, here is his patch:

http://lists.openembedded.org/pipermail/openembedded-core/2014-December/099559.html
Comment 3 Richard Purdie 2018-11-15 16:38:16 UTC
The patch:

http://lists.openembedded.org/pipermail/openembedded-core/2014-December/099560.html

but this wasn't merged for some reason
Comment 4 Randy MacLeod 2019-10-25 15:46:07 UTC
Move to M3 since M4 is for bug fixes.