module-base.bbclass: keep PR if MACHINE_KERNEL_PR is not set
authorEric Bénard <eric@eukrea.com>
Mon, 3 May 2010 21:13:47 +0000 (23:13 +0200)
committerEric Bénard <eric@eukrea.com>
Tue, 18 May 2010 08:51:15 +0000 (10:51 +0200)
Signed-off-by: Eric Bénard <eric@eukrea.com>
Acked-by: Phil Blundell <philb@gnu.org>
classes/module-base.bbclass

index bc53e1b..9aaaa4e 100644 (file)
@@ -7,7 +7,12 @@ export CROSS_COMPILE = "${TARGET_PREFIX}"
 
 # A machine.conf or local.conf can increase MACHINE_KERNEL_PR to force
 # rebuilds for kernel and external modules
-PR = "${MACHINE_KERNEL_PR}"
+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)
+}
 
 export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion')}"
 export KERNEL_SOURCE = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-source')}"