diff mbox series

[3/3] scripts/runqemu: remove the code block that works around the missing bitbake environment

Message ID 20251007124652.259629-3-alex.kanavin@gmail.com
State Accepted, archived
Commit b931f74442e9f2fba95600ba056a5bd898c23b5a
Headers show
Series [1/3] scripts/runqemu: raise an error when bitbake was not found | expand

Commit Message

Alexander Kanavin Oct. 7, 2025, 12:46 p.m. UTC
From: Alexander Kanavin <alex@linutronix.de>

As confirmed by the previous patch this code path is never taken
and can be removed.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 scripts/runqemu | 34 ++++++----------------------------
 1 file changed, 6 insertions(+), 28 deletions(-)
diff mbox series

Patch

diff --git a/scripts/runqemu b/scripts/runqemu
index 1e8406e1194..2be7a0f2869 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -1007,34 +1007,12 @@  to your build configuration.
             if not self.bitbake_e:
                 self.load_bitbake_env()
 
-            if self.bitbake_e:
-                native_vars = ['STAGING_DIR_NATIVE']
-                for nv in native_vars:
-                    s = re.search('^%s="(.*)"' % nv, self.bitbake_e, re.M)
-                    if s and s.group(1) != self.get(nv):
-                        logger.info('Overriding conf file setting of %s to %s from Bitbake environment' % (nv, s.group(1)))
-                        self.set(nv, s.group(1))
-            else:
-                # when we're invoked from a running bitbake instance we won't
-                # be able to call `bitbake -e`, then try:
-                # - get OE_TMPDIR from environment and guess paths based on it
-                # - get OECORE_NATIVE_SYSROOT from environment (for sdk)
-                tmpdir = self.get('OE_TMPDIR')
-                oecore_native_sysroot = self.get('OECORE_NATIVE_SYSROOT')
-                if tmpdir:
-                    logger.info('Setting STAGING_DIR_NATIVE and STAGING_BINDIR_NATIVE relative to OE_TMPDIR (%s)' % tmpdir)
-                    hostos, _, _, _, machine = os.uname()
-                    buildsys = '%s-%s' % (machine, hostos.lower())
-                    staging_dir_native = '%s/sysroots/%s' % (tmpdir, buildsys)
-                    self.set('STAGING_DIR_NATIVE', staging_dir_native)
-                elif oecore_native_sysroot:
-                    logger.info('Setting STAGING_DIR_NATIVE to OECORE_NATIVE_SYSROOT (%s)' % oecore_native_sysroot)
-                    self.set('STAGING_DIR_NATIVE', oecore_native_sysroot)
-                if self.get('STAGING_DIR_NATIVE'):
-                    # we have to assume that STAGING_BINDIR_NATIVE is at usr/bin
-                    staging_bindir_native = '%s/usr/bin' % self.get('STAGING_DIR_NATIVE')
-                    logger.info('Setting STAGING_BINDIR_NATIVE to %s' % staging_bindir_native)
-                    self.set('STAGING_BINDIR_NATIVE', '%s/usr/bin' % self.get('STAGING_DIR_NATIVE'))
+            native_vars = ['STAGING_DIR_NATIVE']
+            for nv in native_vars:
+                s = re.search('^%s="(.*)"' % nv, self.bitbake_e, re.M)
+                if s and s.group(1) != self.get(nv):
+                    logger.info('Overriding conf file setting of %s to %s from Bitbake environment' % (nv, s.group(1)))
+                    self.set(nv, s.group(1))
 
     def print_config(self):
         logoutput = ['Continuing with the following parameters:']