]> code.ossystems Code Review - openembedded-core.git/commit
classes/archive: do_configure should not depend on do_ar_patched
authorJoshua Watt <JPEWhacker@gmail.com>
Fri, 3 Jul 2020 13:16:37 +0000 (08:16 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 5 Jul 2020 14:04:00 +0000 (15:04 +0100)
commitf02c1904330da47a25cf85f0077712f584f4ee5b
tree76ba6d114e96dc825ab14aa1b843d2e79dacebb1
parent504f1d158bf7c6ad08fbce755021db2b14565231
classes/archive: do_configure should not depend on do_ar_patched

The commit d4be264061 ("classes/archiver: run do_unpack_and_patch after
do_preconfigure") correctly moved do_unpack_and_patch to depend on
do_preconfigure, but left do_ar_patched as a dependency of do_configure
introduced from 8a7c779487 ("classes/archiver: Create patched archive
before configuring"). Having do_configure depend on do_ar_patched is
blatantly wrong. Firstly, doing so causes the taskhash of do_configure
to change which is undesirable. Secondly, the anon python that sets up
the tasks carefully skips GCC recipes that depend on gcc-source to
provide their source code since running do_unpack_and_patch in them
would delete the source code. Adding in the dependency effectively
bypasses this and makes these recipes delete the shared gcc-source

This fixes errors (for real this time) like:

 cat: .../gcc/defaults.h: No such file or directory

when making certain configuration changes.

For posterity, you could easily reproduce gcc-source being erased by
running the commands (replacing aarch64 with your correct target arch):

 bitbake -c cleanall gcc-source gcc-cross-aarch64
 bitbake -c do_deploy_archives gcc-source

 # The following would fail because
 # gcc-cross-aarch64:do_unpack_and_patch erases shared source, so
 # do_configure after that fails.
 bitbake gcc-cross-aarch64

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/archiver.bbclass