]> code.ossystems Code Review - openembedded-core.git/commit
kmod: do not symlink config.guess/config.sub during autoreconf
authorGavin Li <gavin@matician.com>
Tue, 13 Apr 2021 05:29:23 +0000 (22:29 -0700)
committerAnuj Mittal <anuj.mittal@intel.com>
Fri, 23 Apr 2021 15:20:39 +0000 (23:20 +0800)
commitb423a574496a7bf6023883584a6d1ad1cdb8f017
tree5cb2089415557ab0aa246b6b7e7800a4ac5a3137
parentb2a233c9c5fb919d6507683bdf27a4435a2b5285
kmod: do not symlink config.guess/config.sub during autoreconf

I was encountering the following race condition on poky:

- automake-native does do_install.
- automake-native does do_populate_sysroot. This hardlinks config.guess
  and config.sub into ${D}.
- kmod-native does do_configure. This runs `autoreconf`, which runs
  `automake --add-missing` (symlinks config.guess/config.sub from
  recipe-sysroot-native to build dir), then runs `gnu-configize` (copies
  _its own_ config.guess/config.sub _on top_ of the already existing
  ones). Since the destinations already had symlinks, the copy would
  overwrite config.guess/config.sub in recipe-sysroot-native, which
  would in turn overwrite the same in ${D} due to being hardlinked.
- automake-native does do_package. The outhash is thus calculated on the
  clobbered config.guess/config.sub files.

With hash equivalency enabled, the different outhash produced a
different unihash, which kept me from reusing sstate between my laptop
and my build server. This race condition would happen only on the build
server (BB_NUMBER_THREADS = 32) but never on my laptop
(BB_NUMBER_THREADS = 6).

I didn't see the --install and --symlink flags being used by any other
recipe, so I removed them, and that fixed the issue.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 89d675efd633b495daa4a3a57420b9c309497035)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
meta/recipes-kernel/kmod/kmod.inc