Преглед изворни кода

runqemu: Improve relative path handling in qemuconf files

If a variable starts with "../", its likely its a path and we want to
set it to an absolute path relative to the qemuconf file.

This means we don't have to use bitbake as often to figure out variables.

(From OE-Core rev: dfc7940900d798aa47716288338107e1d46a3972)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie пре 7 година
родитељ
комит
3ee7dcf68b
1 измењених фајлова са 2 додато и 0 уклоњено
  1. 2 0
      scripts/runqemu

+ 2 - 0
scripts/runqemu

@@ -726,6 +726,8 @@ class BaseConfig(object):
         cf.read(self.qemuboot)
         cf.read(self.qemuboot)
         for k, v in cf.items('config_bsp'):
         for k, v in cf.items('config_bsp'):
             k_upper = k.upper()
             k_upper = k.upper()
+            if v.startswith("../"):
+                v = os.path.abspath(os.path.dirname(self.qemuboot) + "/" + v)
             self.set(k_upper, v)
             self.set(k_upper, v)
 
 
     def validate_paths(self):
     def validate_paths(self):