Patchwork =?koi8-r?b?TUFDSElORV9LRVJORUxfUFIgb3ZlcnJpZGVzIFBSIGZvciBt?= =?koi8-r?b?b2R1bGVz?=

login
register
mail settings
Submitter Denis Dydychkin
Date Feb. 20, 2011, 9:59 a.m.
Message ID <E1Pr64K-0003ub-00.nyrl-mail-ru@f253.mail.ru>
Download mbox | patch
Permalink /patch/729/
State RFC
Headers show

Comments

Denis Dydychkin - Feb. 20, 2011, 9:59 a.m.
When recipe inherits module.bbclass, it will get its PR overwritten if
MACHINE_KERNEL_PR is defined. The outcome is that bumping PR within recipe has
no effect, as well as SRCREV does not work anymore, which is especially
important when working with latest version from repos.

The following patch fixes this problem by appending MACHINE_KERNEL_PR to PR
instead of replacing it. "+k" is added to get resulting PR looks like "r1+kr22"
or "r1+svnr222+kr33" since MACHINE_KERNEL_PR is usually defined as "rXX".
Graeme Gregory - Feb. 20, 2011, 10:40 a.m.
I think this patch is actually an indication that we need to rethink how
PR is generated and how it is abused
to contain SRCREV.

Graeme

On 20/02/2011 09:59, Denis Dydychkin wrote:
>
> When recipe inherits module.bbclass, it will get its PR overwritten if
> MACHINE_KERNEL_PR is defined. The outcome is that bumping PR within recipe has
> no effect, as well as SRCREV does not work anymore, which is especially
> important when working with latest version from repos.
>
> The following patch fixes this problem by appending MACHINE_KERNEL_PR to PR
> instead of replacing it. "+k" is added to get resulting PR looks like "r1+kr22"
> or "r1+svnr222+kr33" since MACHINE_KERNEL_PR is usually defined as "rXX".
>
>
> --- classes/module-base.bbclass 2011-02-17 16:14:45.792425264 +0300
> +++ classes/module-base.bbclass 2011-02-17 16:36:00.088425246 +0300
> @@ -11,7 +11,8 @@
>      machine_kernel_pr = bb.data.getVar('MACHINE_KERNEL_PR', d, True)
>
>      if machine_kernel_pr:
> -       bb.data.setVar('PR', machine_kernel_pr, d)
> +       pr = bb.data.getVar('PR', d, True) + "+k" + machine_kernel_pr
> +       bb.data.setVar('PR', pr, d)
>  }
>
>  export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion')}"
>
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

Patch

--- classes/module-base.bbclass 2011-02-17 16:14:45.792425264 +0300
+++ classes/module-base.bbclass 2011-02-17 16:36:00.088425246 +0300
@@ -11,7 +11,8 @@ 
     machine_kernel_pr = bb.data.getVar('MACHINE_KERNEL_PR', d, True)

     if machine_kernel_pr:
-       bb.data.setVar('PR', machine_kernel_pr, d)
+       pr = bb.data.getVar('PR', d, True) + "+k" + machine_kernel_pr
+       bb.data.setVar('PR', pr, d)
 }

 export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion')}"