Patchwork do_patch signature confliction for gcc family recipes

login
register
mail settings
Submitter Lianhao Lu
Date Feb. 9, 2012, 6:22 a.m.
Message ID <857BE142E5399E46B20FD45B9DB8A7BC0FCE533D@SHSMSX102.ccr.corp.intel.com>
Download mbox | patch
Permalink /patch/21037/
State New
Headers show

Comments

Lianhao Lu - Feb. 9, 2012, 6:22 a.m.
Hi guys,

I just found that the gcc-runtime-nativesdk has different task signature for task do_patch, comparing to that of gcc-cross-initial. This would cause a do_patch failure if we use OEBasicHash as the BB_SIGNATURE_HANDLER. By comparing their sigdata files, it turns out that the difference comes from the dependency to the variable PN in do_patch(See the following output of diffsigs). It is not designed, because all gcc family recipes share the same source therefore should have the same signature for all do_patch tasks.

$ bitbake-diffsigs i586-poky-linux/gcc-cross-initial-4.6.2+svnr181430-r22.do_patch.sigdata.c7458123b61e7799d85c0f7b5c2c42f5 x86_64-nativesdk-pokysdk-linux/gcc-runtime-nativesdk-4.6.2+svnr181430-r22.do_patch.sigdata.c6fd9cc8796537680198a31c39a5efb7 

basehash changed from 49509723413c15e414b91b1e0074c169 to 026f47cf7b6f9bc6358b8727a14feacd
List of dependencies for variable PN changed from set(['FILE']) to set([])
changed items: set(['FILE'])
Variable PN value changed from {@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[0] or 'defaultpkgname'} to gcc-runtime-nativesdk
Task dependency hash changed from 1cad915227dbbe6a9d2e5f85c9a4748f to 2526a771c7e3d733fccbff32c70328cc (for gcc-cross-initial_4.6.bb.do_unpack and quilt-native_0.51.bb.do_populate_sysroot)
Task dependency hash changed from 2526a771c7e3d733fccbff32c70328cc to 214e4a3f054da63cb266af4394ccb9a5 (for quilt-native_0.51.bb.do_populate_sysroot and virtual:nativesdkgcc-runtime_4.6.bb.do_headerfix)
Task dependency hash changed from 214e4a3f054da63cb266af4394ccb9a5 to 1cad915227dbbe6a9d2e5f85c9a4748f (for gcc-cross-initial_4.6.bb.do_headerfix and virtual:nativesdkgcc-runtime_4.6.bb.do_unpack)

I'm wondering if it is a correct way to fix this issue by excluding the PN from do_patch dependency:


Best Regards,
-Lianhao
Khem Raj - Feb. 9, 2012, 6:39 a.m.
On Wed, Feb 8, 2012 at 10:22 PM, Lu, Lianhao <lianhao.lu@intel.com> wrote:
> I'm wondering if it is a correct way to fix this issue by excluding the PN from do_patch dependency:
> diff --git a/meta/recipes-devtools/gcc/gcc-common.inc b/meta/recipes-devtools/gc
> index e89a7c0..57668f9 100644
> --- a/meta/recipes-devtools/gcc/gcc-common.inc
> +++ b/meta/recipes-devtools/gcc/gcc-common.inc
> @@ -109,3 +109,4 @@ do_headerfix[vardepvalue] = "PATH"
>  # We need to ensure that for the shared work directory, the do_patch singatures
>  # The real WORKDIR location isn't a dependency for the shared workdir.
>  src_patches[vardepsexclude] = "WORKDIR"
> +should_apply[vardepsexclude] = "PN"

I think its ok. gcc  does not use SRCREV at all and not SRCREV_PN so
excluding it is ok
Richard Purdie - Feb. 9, 2012, 10:46 a.m.
On Thu, 2012-02-09 at 06:22 +0000, Lu, Lianhao wrote:
> Hi guys,
> 
> I just found that the gcc-runtime-nativesdk has different task signature for task do_patch, comparing to that of gcc-cross-initial. This would cause a do_patch failure if we use OEBasicHash as the BB_SIGNATURE_HANDLER. By comparing their sigdata files, it turns out that the difference comes from the dependency to the variable PN in do_patch(See the following output of diffsigs). It is not designed, because all gcc family recipes share the same source therefore should have the same signature for all do_patch tasks.
> 
> $ bitbake-diffsigs i586-poky-linux/gcc-cross-initial-4.6.2+svnr181430-r22.do_patch.sigdata.c7458123b61e7799d85c0f7b5c2c42f5 x86_64-nativesdk-pokysdk-linux/gcc-runtime-nativesdk-4.6.2+svnr181430-r22.do_patch.sigdata.c6fd9cc8796537680198a31c39a5efb7 
> 
> basehash changed from 49509723413c15e414b91b1e0074c169 to 026f47cf7b6f9bc6358b8727a14feacd
> List of dependencies for variable PN changed from set(['FILE']) to set([])
> changed items: set(['FILE'])
> Variable PN value changed from {@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[0] or 'defaultpkgname'} to gcc-runtime-nativesdk
> Task dependency hash changed from 1cad915227dbbe6a9d2e5f85c9a4748f to 2526a771c7e3d733fccbff32c70328cc (for gcc-cross-initial_4.6.bb.do_unpack and quilt-native_0.51.bb.do_populate_sysroot)
> Task dependency hash changed from 2526a771c7e3d733fccbff32c70328cc to 214e4a3f054da63cb266af4394ccb9a5 (for quilt-native_0.51.bb.do_populate_sysroot and virtual:nativesdkgcc-runtime_4.6.bb.do_headerfix)
> Task dependency hash changed from 214e4a3f054da63cb266af4394ccb9a5 to 1cad915227dbbe6a9d2e5f85c9a4748f (for gcc-cross-initial_4.6.bb.do_headerfix and virtual:nativesdkgcc-runtime_4.6.bb.do_unpack)
> 
> I'm wondering if it is a correct way to fix this issue by excluding the PN from do_patch dependency:
> diff --git a/meta/recipes-devtools/gcc/gcc-common.inc b/meta/recipes-devtools/gc
> index e89a7c0..57668f9 100644
> --- a/meta/recipes-devtools/gcc/gcc-common.inc
> +++ b/meta/recipes-devtools/gcc/gcc-common.inc
> @@ -109,3 +109,4 @@ do_headerfix[vardepvalue] = "PATH"
>  # We need to ensure that for the shared work directory, the do_patch singatures
>  # The real WORKDIR location isn't a dependency for the shared workdir.
>  src_patches[vardepsexclude] = "WORKDIR"
> +should_apply[vardepsexclude] = "PN"

I think this is the correct fix in this case and I'll take such a patch.

Cheers,

Richard

Patch

diff --git a/meta/recipes-devtools/gcc/gcc-common.inc b/meta/recipes-devtools/gc
index e89a7c0..57668f9 100644
--- a/meta/recipes-devtools/gcc/gcc-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-common.inc
@@ -109,3 +109,4 @@  do_headerfix[vardepvalue] = "PATH"
 # We need to ensure that for the shared work directory, the do_patch singatures
 # The real WORKDIR location isn't a dependency for the shared workdir.
 src_patches[vardepsexclude] = "WORKDIR"
+should_apply[vardepsexclude] = "PN"