]> code.ossystems Code Review - openembedded-core.git/commitdiff
rootfs.py: strip kernel-abiversion useless readline
authorHongxu Jia <hongxu.jia@windriver.com>
Sun, 26 Jan 2014 10:14:17 +0000 (18:14 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 11 Feb 2014 11:50:28 +0000 (11:50 +0000)
It failed to read Kernel version from kernel-abiversion
file, the reason was it didn't strip the readline.
...
 Error: Kernel version 3.10.25-yocto-standard
  does not match kernel-abiversion (3.10.25-yocto-standard)
...

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
meta/lib/oe/rootfs.py

index e884e47733b630b974468dff6278d9c0f0d3e2e0..c149c94271152c70700ee4cc1fe98c1d5e4fe1b2 100644 (file)
@@ -193,7 +193,7 @@ class Rootfs(object):
         kernel_abi_ver_file = os.path.join(self.d.getVar('STAGING_KERNEL_DIR', True),
                                            'kernel-abiversion')
         if os.path.exists(kernel_abi_ver_file):
-            kernel_ver = open(kernel_abi_ver_file).read()
+            kernel_ver = open(kernel_abi_ver_file).read().strip(' \n')
             modules_dir = os.path.join(self.image_rootfs, 'lib', 'modules', kernel_ver)
 
             bb.utils.mkdirhier(modules_dir)