]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
scripts/runqemu: remove the code block that works around the missing bitbake environment
authorAlexander Kanavin <alex@linutronix.de>
Tue, 7 Oct 2025 12:46:52 +0000 (14:46 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 9 Oct 2025 09:27:02 +0000 (10:27 +0100)
As confirmed by the previous patch this code path is never taken
and can be removed.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/runqemu

index ed1350a7282905c5e65beda1da24ef26947586e4..55b8c05217e18e59db1bdd6eeeafb9748057dbd1 100755 (executable)
@@ -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:']