diff options
author | Marcin Juszkiewicz <hrw@openembedded.org> | 2005-06-27 17:01:21 +0000 |
---|---|---|
committer | Marcin Juszkiewicz <hrw@openembedded.org> | 2005-06-27 17:01:21 +0000 |
commit | ed962a7190e93bc66ca03cadb7885ea93e8bcf6f (patch) | |
tree | 0e9cc669dda03941bbfd17f02d63defedf811ba4 /classes/linux_modules.bbclass | |
parent | e4d3f2b5aff8afdbadb1376435b7c191fd14698e (diff) |
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
Diffstat (limited to 'classes/linux_modules.bbclass')
-rw-r--r-- | classes/linux_modules.bbclass | 9 |
1 files changed, 5 insertions, 4 deletions
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 |