From patchwork Thu Mar 24 15:37:04 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: kernel/module-base: Append PR to MACHINE_KERNEL_PR Date: Thu, 24 Mar 2011 15:37:04 -0000 From: Andreas Oberritter X-Patchwork-Id: 1785 Message-Id: <1300981024-9111-2-git-send-email-obi@opendreambox.org> To: openembedded-devel@lists.openembedded.org Cc: Denis Dydychkin Based on http://comments.gmane.org/gmane.comp.handhelds.openembedded/42905 Signed-off-by: Andreas Oberritter CC: Denis Dydychkin CC: Frans Meulenbroeks --- 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')}"