On Wed, Mar 11, 2015 at 5:28 PM, Ed Bartosh <ed.bart...@linux.intel.com> wrote: > Merged do_shared_workdir into kernel_do_compile > > This change should fix race condition between do_compilemodules > and do_shared_workdir. Race occurs when do_compilemodules changes > include/generated/ directory content while do_shared_workdir > tries to copy it. > > Fixes [YOCTO #7321]
Why would you be working on a bug, that is currently assigned to me .. without even mentioning it ? I have several patches in flight for this, but didn't want to bring them into play yet, since the risks of juggling this again .. are far greater than the shared directory issues IMHO. I actually have some uses of the shared workdir, that were nice to enable without having to go through the whole compile again .. that is no longer possible, and again, a reason to stop juggling this around. Brue > > Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> > --- > meta/classes/kernel-yocto.bbclass | 2 +- > meta/classes/kernel.bbclass | 5 ++--- > meta/classes/module-base.bbclass | 2 +- > meta/recipes-kernel/linux/kernel-devsrc.bb | 2 +- > meta/recipes-kernel/linux/linux-dummy.bb | 5 ----- > meta/recipes-kernel/lttng/lttng-modules_2.6.0.bb | 2 +- > meta/recipes-kernel/perf/perf.bb | 2 +- > 7 files changed, 7 insertions(+), 13 deletions(-) > > diff --git a/meta/classes/kernel-yocto.bbclass > b/meta/classes/kernel-yocto.bbclass > index 8db4899..27a027d 100644 > --- a/meta/classes/kernel-yocto.bbclass > +++ b/meta/classes/kernel-yocto.bbclass > @@ -1,5 +1,5 @@ > # remove tasks that modify the source tree in case externalsrc is inherited > -SRCTREECOVEREDTASKS += "do_kernel_link_vmlinux do_kernel_configme > do_validate_branches do_kernel_configcheck do_kernel_checkout > do_shared_workdir do_fetch do_unpack do_patch" > +SRCTREECOVEREDTASKS += "do_kernel_link_vmlinux do_kernel_configme > do_validate_branches do_kernel_configcheck do_kernel_checkout do_fetch > do_unpack do_patch" > > # returns local (absolute) path names for all valid patches in the > # src_uri > diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass > index 125ed88..7914242 100644 > --- a/meta/classes/kernel.bbclass > +++ b/meta/classes/kernel.bbclass > @@ -192,6 +192,7 @@ kernel_do_compile() { > if test "${KERNEL_IMAGETYPE_FOR_MAKE}.gz" = "${KERNEL_IMAGETYPE}"; > then > gzip -9c < "${KERNEL_IMAGETYPE_FOR_MAKE}" > "${KERNEL_OUTPUT}" > fi > + shared_workdir > } > > do_compile_kernelmodules() { > @@ -234,8 +235,6 @@ kernel_do_install() { > } > do_install[prefuncs] += "package_get_auto_pr" > > -addtask shared_workdir after do_compile before do_install > - > emit_depmod_pkgdata() { > # Stash data for depmod > install -d ${PKGDESTWORK}/kernel-depmod/ > @@ -245,7 +244,7 @@ emit_depmod_pkgdata() { > > PACKAGEFUNCS += "emit_depmod_pkgdata" > > -do_shared_workdir () { > +shared_workdir () { > cd ${B} > > kerneldir=${STAGING_KERNEL_BUILDDIR} > diff --git a/meta/classes/module-base.bbclass > b/meta/classes/module-base.bbclass > index 3eb2e92..31ab95f 100644 > --- a/meta/classes/module-base.bbclass > +++ b/meta/classes/module-base.bbclass > @@ -15,7 +15,7 @@ KERNEL_OBJECT_SUFFIX = ".ko" > # kernel modules are generally machine specific > PACKAGE_ARCH = "${MACHINE_ARCH}" > > -do_configure[depends] += "virtual/kernel:do_shared_workdir" > +do_configure[depends] += "virtual/kernel:kernel_do_compile" > > # Function to ensure the kernel scripts are created. Expected to > # be called before do_compile. See module.bbclass for an exmaple. > diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb > b/meta/recipes-kernel/linux/kernel-devsrc.bb > index e36de1b..f2a1d7c 100644 > --- a/meta/recipes-kernel/linux/kernel-devsrc.bb > +++ b/meta/recipes-kernel/linux/kernel-devsrc.bb > @@ -16,7 +16,7 @@ inherit module-base > # We need the kernel to be staged (unpacked, patched and configured) before > # we can grab the source and make the source package. We also need the bits > from > # ${B} not to change while we install, so virtual/kernel must finish > do_compile. > -do_install[depends] += "virtual/kernel:do_shared_workdir" > +do_install[depends] += "virtual/kernel:kernel_do_compile" > # Need the source, not just the output of populate_sysroot > do_install[depends] += "virtual/kernel:do_compile" > > diff --git a/meta/recipes-kernel/linux/linux-dummy.bb > b/meta/recipes-kernel/linux/linux-dummy.bb > index cc0e4e6..8f4ddc4 100644 > --- a/meta/recipes-kernel/linux/linux-dummy.bb > +++ b/meta/recipes-kernel/linux/linux-dummy.bb > @@ -33,10 +33,6 @@ do_compile () { > : > } > > -do_shared_workdir () { > - : > -} > - > do_install() { > : > } > @@ -51,4 +47,3 @@ do_deploy() { > > addtask bundle_initramfs after do_install before do_deploy > addtask deploy after do_install > -addtask shared_workdir after do_compile before do_install > diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.6.0.bb > b/meta/recipes-kernel/lttng/lttng-modules_2.6.0.bb > index d0039b3..9d07ae4 100644 > --- a/meta/recipes-kernel/lttng/lttng-modules_2.6.0.bb > +++ b/meta/recipes-kernel/lttng/lttng-modules_2.6.0.bb > @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = > "file://LICENSE;md5=1412caf5a1aa90d6a48588a4794c0eac \ > file://lgpl-2.1.txt;md5=243b725d71bb5df4a1e5920b344b86ad" > > DEPENDS = "virtual/kernel" > -do_configure[depends] += "virtual/kernel:do_shared_workdir" > +do_configure[depends] += "virtual/kernel:kernel_do_compile" > > inherit module > > diff --git a/meta/recipes-kernel/perf/perf.bb > b/meta/recipes-kernel/perf/perf.bb > index f69d177..59d6be2 100644 > --- a/meta/recipes-kernel/perf/perf.bb > +++ b/meta/recipes-kernel/perf/perf.bb > @@ -32,7 +32,7 @@ DEPENDS = " \ > bison flex \ > " > > -do_configure[depends] += "virtual/kernel:do_shared_workdir" > +do_configure[depends] += "virtual/kernel:kernel_do_compile" > > PROVIDES = "virtual/perf" > > -- > 2.1.4 > > -- > _______________________________________________ > yocto mailing list > yocto@yoctoproject.org > https://lists.yoctoproject.org/listinfo/yocto -- "Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end" -- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto