Kaynağa Gözat

oe.external.run: let cmd already start with the prefix

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Christopher Larson 4 yıl önce
ebeveyn
işleme
14fa5f8079
1 değiştirilmiş dosya ile 5 ekleme ve 2 silme
  1. 5 2
      lib/oe/external.py

+ 5 - 2
lib/oe/external.py

@@ -10,9 +10,12 @@ def run(d, cmd, *args):
     topdir = d.getVar('TOPDIR')
     topdir = d.getVar('TOPDIR')
     toolchain_path = d.getVar('EXTERNAL_TOOLCHAIN')
     toolchain_path = d.getVar('EXTERNAL_TOOLCHAIN')
     if toolchain_path:
     if toolchain_path:
-        target_cmd = d.getVar('EXTERNAL_TARGET_SYS') + '-' + cmd
+        target_prefix = d.getVar('EXTERNAL_TARGET_SYS') + '-'
+        if not cmd.startswith(target_prefix):
+            cmd = target_prefix + cmd
+
         toolchain_bin = d.getVar('EXTERNAL_TOOLCHAIN_BIN')
         toolchain_bin = d.getVar('EXTERNAL_TOOLCHAIN_BIN')
-        path = os.path.join(toolchain_bin, target_cmd)
+        path = os.path.join(toolchain_bin, cmd)
         args = shlex.split(path) + list(args)
         args = shlex.split(path) + list(args)
 
 
         try:
         try: