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') 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