- logging.debug("Processing %s", one_sdk['ENV_FILE'])
- PROFILE = one_sdk['ENV_FILE'].split('/')[3]
- VERSION = one_sdk['ENV_FILE'].split('/')[4]
- ARCH = one_sdk['ENV_FILE'].split('/')[5]
+ logging.debug('Processing %s', one_sdk['ENV_FILE'])
+ envFile = one_sdk['ENV_FILE'].split(SDK_ROOT_DIR+'/')[1]
+ PROFILE = envFile.split('/')[0]
+ VERSION = envFile.split('/')[1]
+ ARCH = envFile.split('/')[2]
+ # and specific case for qemu where arch is not the same (qemux86-64 vs corei7-64)
+ if ARCH == 'corei7-64':
+ # Use /etc/rpm/platform to distinguish qemux86-64 from corei7-64 architecture
+ grepQemu = subprocess.call(['grep', '-q', 'qemux86', os.path.join(
+ one_sdk['SYSROOTS'], 'corei7-64-agl-linux', 'etc', 'rpm', 'platform')],
+ stdout=DEVNULL, stderr=subprocess.STDOUT)
+ if grepQemu == 0:
+ ARCH = 'qemux86-64'
+