Based on http://comments.gmane.org/gmane.comp.handhelds.openembedded/42905
Signed-off-by: Andreas Oberritter <[email protected]> CC: Denis Dydychkin <[email protected]> CC: Frans Meulenbroeks <[email protected]> --- classes/kernel.bbclass | 10 +++++++++- classes/module-base.bbclass | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass index 0109ce6..a462ab4 100644 --- a/classes/kernel.bbclass +++ b/classes/kernel.bbclass @@ -24,7 +24,15 @@ python __anonymous () { machine_kernel_pr = bb.data.getVar('MACHINE_KERNEL_PR', d, True) if machine_kernel_pr: - bb.data.setVar('PR', machine_kernel_pr, d) + # Append + # a) .X, if the recipe's PR is rX, or + # b) +${PR}, if the recipe's PR doesn't begin with r + pr = bb.data.getVar('PR', d, True) + if pr.startswith('r'): + suffix = '.' + pr[1:] + else: + suffix = '+' + pr + bb.data.setVar('PR', machine_kernel_pr + suffix, d) } INITRAMFS_IMAGE ?= "" diff --git a/classes/module-base.bbclass b/classes/module-base.bbclass index 9aaaa4e..edc0774 100644 --- a/classes/module-base.bbclass +++ b/classes/module-base.bbclass @@ -11,7 +11,15 @@ python __anonymous () { machine_kernel_pr = bb.data.getVar('MACHINE_KERNEL_PR', d, True) if machine_kernel_pr: - bb.data.setVar('PR', machine_kernel_pr, d) + # Append + # a) .X, if the recipe's PR is rX, or + # b) +${PR}, if the recipe's PR doesn't begin with r + pr = bb.data.getVar('PR', d, True) + if pr.startswith('r'): + suffix = '.' + pr[1:] + else: + suffix = '+' + pr + bb.data.setVar('PR', machine_kernel_pr + suffix, d) } export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion')}" -- 1.7.2.3 _______________________________________________ Openembedded-devel mailing list [email protected] http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
