[oe] [PATCH] kernel/module-base: Append PR to MACHINE_KERNEL_PR
Andreas Oberritter
obi at opendreambox.org
Thu Mar 24 15:37:04 UTC 2011
Based on http://comments.gmane.org/gmane.comp.handhelds.openembedded/42905
Signed-off-by: Andreas Oberritter <obi at opendreambox.org>
CC: Denis Dydychkin <nyrl at mail.ru>
CC: Frans Meulenbroeks <fransmeulenbroeks at gmail.com>
---
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
More information about the Openembedded-devel
mailing list