Merge bk://oe-devel@oe-devel.bkbits.net/openembedded/
authorMarcin Juszkiewicz <hrw@openembedded.org>
Mon, 27 Jun 2005 17:01:21 +0000 (17:01 +0000)
committerMarcin Juszkiewicz <hrw@openembedded.org>
Mon, 27 Jun 2005 17:01:21 +0000 (17:01 +0000)
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

index 62ebb58..d5c4e74 100644 (file)
@@ -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