From a780643c4b6aa11e1a36965a69df7116477c7b4c Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Tue, 7 Dec 2004 22:05:47 +0000 Subject: Merge oe-devel@oe-devel.bkbits.net:packages.bb into handhelds.org:/home/kergoth/code/packages.bb 2004/12/07 04:58:25-06:00 ti.com!kergoth More updates per the core rename. 2004/12/07 04:46:51-06:00 ti.com!kergoth Update soundtracker per the core rename. 2004/12/07 04:44:14-06:00 ti.com!kergoth Merge 2004/12/07 04:42:38-06:00 ti.com!kergoth Updates per the recent rename of the oe core from 'oe' to 'bitbake'. BKrev: 41b6293b91LRHSxMOt6WnrZVAdLbFw --- classes/linux_modules.bbclass | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 classes/linux_modules.bbclass (limited to 'classes/linux_modules.bbclass') diff --git a/classes/linux_modules.bbclass b/classes/linux_modules.bbclass new file mode 100644 index 0000000000..e69de29bb2 -- cgit v1.2.3 From 6f600c6712eacafcd97e03df4b0ba85a8075d604 Mon Sep 17 00:00:00 2001 From: Phil Blundell Date: Mon, 27 Jun 2005 16:27:26 +0000 Subject: respect PARALLEL_INSTALL_MODULES BKrev: 42c028eePdyvKCUGWCioz2Zgc1TqBg --- classes/linux_modules.bbclass | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'classes/linux_modules.bbclass') diff --git a/classes/linux_modules.bbclass b/classes/linux_modules.bbclass index e69de29bb2..62ebb5898c 100644 --- a/classes/linux_modules.bbclass +++ b/classes/linux_modules.bbclass @@ -0,0 +1,18 @@ +def get_kernelmajorversion(p): + import re + r = re.compile("([0-9]+\.[0-9]+).*") + m = r.match(p); + if m: + return m.group(1) + return None + +def linux_module_packages(s, d): + import bb + if (bb.data.getVar("PARALLEL_INSTALL_MODULES", d, 1) == "1"): + suffix = "-%s" % (get_kernelmajorversion(base_read_file(bb.data.expand('${STAGING_KERNEL_DIR}/kernel-abiversion', d)))) + else: + suffix = "" + return " ".join(map(lambda s: "kernel-module-%s%s" % (s.lower().replace('_', '-').replace('@', '+'), suffix), s.split())) + +# that's all + -- cgit v1.2.3 From ed962a7190e93bc66ca03cadb7885ea93e8bcf6f Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Mon, 27 Jun 2005 17:01:21 +0000 Subject: Merge bk://oe-devel@oe-devel.bkbits.net/openembedded/ into home.hrw.one.pl:/home/hrw/zaurus/oe/openembedded 2005/06/27 17:58:39+01:00 reciva.com!pb avoid "no such file" when building native packages BKrev: 42c030e1otO46VX06g7pILq1TZd7dw --- classes/linux_modules.bbclass | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'classes/linux_modules.bbclass') diff --git a/classes/linux_modules.bbclass b/classes/linux_modules.bbclass index 62ebb5898c..d5c4e74ca1 100644 --- a/classes/linux_modules.bbclass +++ b/classes/linux_modules.bbclass @@ -7,11 +7,12 @@ def get_kernelmajorversion(p): return None def linux_module_packages(s, d): - import bb + import bb, os.path + suffix = "" if (bb.data.getVar("PARALLEL_INSTALL_MODULES", d, 1) == "1"): - suffix = "-%s" % (get_kernelmajorversion(base_read_file(bb.data.expand('${STAGING_KERNEL_DIR}/kernel-abiversion', d)))) - else: - suffix = "" + file = bb.data.expand('${STAGING_KERNEL_DIR}/kernel-abiversion', d) + if (os.path.exists(file)): + suffix = "-%s" % (get_kernelmajorversion(base_read_file(file))) return " ".join(map(lambda s: "kernel-module-%s%s" % (s.lower().replace('_', '-').replace('@', '+'), suffix), s.split())) # that's all -- cgit v1.2.3