[oe-commits] Hongxu Jia : archiver: create dir 'B' explicitly while WORKDIR changed

git at git.openembedded.org git at git.openembedded.org
Tue Jun 17 09:24:15 UTC 2014


Module: openembedded-core.git
Branch: master-next
Commit: 8baefb49d0bf9d3dd757d9b2359e0a9f4f33dd60
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=8baefb49d0bf9d3dd757d9b2359e0a9f4f33dd60

Author: Hongxu Jia <hongxu.jia at windriver.com>
Date:   Sun Jun 15 23:22:57 2014 -0400

archiver: create dir 'B' explicitly while WORKDIR changed

In the do_unpack_and_patch task of archiver, the changed 'WORKDIR' also
casued 'B' changed, create dir 'B' for the possibly requiring of the
tasks which executed in do_unpack_and_patch task.

Such as cut-ecgl's do_patch required 'B' existed:
...
| cp: target 'tmp/work/x86_64-wrs-linux/cut-ecgl/1.0-r0/archiver-work
/cut-ecgl-1.0' is not a directory
...
| ERROR: Function failed: do_patch (log file is located at tmp/work/
x86_64-wrs-linux/cut-ecgl/1.0-r0/temp/do_unpack_and_patch/
log.do_unpack_and_patch.11886)
...

The 'B' dir is implicitly created at the task executing time while the
task tag 'dirs' is not assigned. In the above cut-ecgl example, the 'B'
was created at the wrl_buildlink executing time which is the prefuncs of
task do_unpack. So the following do_patch could use 'B' correctly. But
wrl_buildlink is unnecessary and not invoked in the do_unpack_and_patch
task.

Signed-off-by: Hongxu Jia <hongxu.jia at windriver.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/classes/archiver.bbclass | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 8d8e7c4..efd413b 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -276,6 +276,11 @@ python do_unpack_and_patch() {
     # Change the WORKDIR to make do_unpack do_patch run in another dir.
     d.setVar('WORKDIR', d.getVar('ARCHIVER_WORKDIR', True))
 
+    # The changed 'WORKDIR' also casued 'B' changed, create dir 'B' for the
+    # possibly requiring of the following tasks (such as some recipes's
+    # do_patch required 'B' existed).
+    bb.utils.mkdirhier(d.getVar('B', True))
+
     # The kernel source is ready after do_validate_branches
     if bb.data.inherits_class('kernel-yocto', d):
         bb.build.exec_func('do_unpack', d)



More information about the Openembedded-commits mailing list