From patchwork Tue Oct 7 12:46:50 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 71770 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3BCDCCA470 for ; Tue, 7 Oct 2025 12:47:03 +0000 (UTC) Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by mx.groups.io with SMTP id smtpd.web10.17788.1759841217265325317 for ; Tue, 07 Oct 2025 05:46:57 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=NRLwc0gw; spf=pass (domain: gmail.com, ip: 209.85.128.50, mailfrom: alex.kanavin@gmail.com) Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-46e491a5b96so35733425e9.2 for ; Tue, 07 Oct 2025 05:46:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759841215; x=1760446015; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=hUr1N83aDYefj4cEwmbjvjeXoND48ErYQt0PpUb15Vw=; b=NRLwc0gw5G5UY0iT6uGEK1ChUFMTrpTbwWfmxGCBjmlDfhDOOIL+AyVq3sYb+a2BYF b6JFyJnFRP6pFMax5u0VmwNtLJIoriVYmn2z9HEz/WjOgGuTxUBwOp1P/eH9GQ208WnK DdIGG9SpIivCHcXPMTDC625MIWf01MdKae53d1Nuvt7UspVWGO+yKGq6HCOLURrhE6F7 RgGaAnSd5Rm6eLp4dxIC7V6udrmQsrWj1NizO1qpBEL3Ie90j6c2szNS9yVNSc1gvd8U eELxQfqKIg+pq1b/ZD1dkAJHRZHtmAQW8FchxtIk7bEFPz3fa+FzVMlRJ5dzo1UyfW+n mtwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759841215; x=1760446015; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=hUr1N83aDYefj4cEwmbjvjeXoND48ErYQt0PpUb15Vw=; b=lIsfb2jdGGztInm+TEIz37tjTIH1QDkCeOSx9CSXENKvwAz3rNSdlouSNPog4WS9nq 403fFCp12PpRZ19YGJ5wL7QkEpU15J/6zhUothMOqeefzAdh3XnCFAFLslVWgFgexiX6 1voG8CoaoPcFikt1lpdp0jdfGKi21iZCoH30f9JJ+DPrRAb0TNBEmbjYarn9p7jcsk9w yx0a2LBopdgCuOvE3yppZwsG0jm32HG7tAYhQ0rS8DdTp1R+ZDYh3rfmgx6OKuikoUEr 6K833vs08DmWuOK+GJyx41TFiRxHM9P/RqSEJ7NRRHq8iMTVNEkrEKagMA7aVulhkf3r bYgw== X-Gm-Message-State: AOJu0YxajJj8E7iORYVigTv3BFNBJLa1BN8uXsrT6GKa3Nv7R4gAJ5en dqbAzVcE6mdAH+jpArNaJAgOi0WSMYMgJGMbfWXKlrtxSRASBt8AF9CuG//ZtQ== X-Gm-Gg: ASbGncueDK5kKL4k4jlhIhJTn8gR2UdIXoixA9qHE0PPCq06OqGQw6c7zwFC7fPBVkk eEve9JOJc703t+OrUFT8xstgZxa3XE56q7F3WZfauP5zAuNJ6/Y2IWWqLfsBMLjZ4qRzs1/9HaR qoJgbm4M8S7qFPF4v/DvBIt2E8rnVfpTkvX8A4cPn6s19hYm9LK1doOXqsGqBtG6cTANnZb9e14 Mtz5Ap/Cv69943mX6aq0eflKfy6O939OyzNDl/9rxiZJERkqImFMqw0x1Ihb4kVDv+Ee90pQp2t 3c8CdIoWA/qJgsLhSzrh7kt5e0HJjRAqzpM1awPseL4ceGar/Jfrg27oVPilFP9NlOp5ApKp5k+ Ss1pE4h/9rBhz1SeTuJfdYjixgMQVRL6okhL4FTyTWgYY1oxxCLbePgq4OrhRdWhqGLb8ueVBYq mOLUT9siWEGTa7uSJjY/fiJfPav78J8IB/SVz0jo5oVEjSQsdQJ1W7ybKpDdE9Apcj0nd9sdLqJ ocPMEHBM/cnN/aqzcsZ X-Google-Smtp-Source: AGHT+IFf34RyxIC7OY+AauvxpqU22TZviyU9DQhNHrfh8M4O4RwGY4sbiDs3yGifk3Ux6o0vSO5d+w== X-Received: by 2002:a05:600c:1c28:b0:46e:6d5f:f73 with SMTP id 5b1f17b1804b1-46e710f6c5cmr115257625e9.3.1759841215255; Tue, 07 Oct 2025 05:46:55 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-46e7234f547sm222707325e9.9.2025.10.07.05.46.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Oct 2025 05:46:54 -0700 (PDT) From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: =?utf-8?q?Richard_Gr=C3=BCnert?= , Richard Purdie , Alexander Kanavin , Mathieu Dubois-Briand Subject: [PATCH 1/3] scripts/runqemu: raise an error when bitbake was not found Date: Tue, 7 Oct 2025 14:46:50 +0200 Message-Id: <20251007124652.259629-1-alex.kanavin@gmail.com> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 07 Oct 2025 12:47:03 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/224531 From: Richard GrĂ¼nert Running 'scrupts/runqemu' without bitbake in PATH causes the following error: ``` Traceback (most recent call last): File "/home/rg/temp_stuff/oe_2/./scripts/runqemu", line 1807, in main config.check_args() ~~~~~~~~~~~~~~~~~^^ File "/home/rg/temp_stuff/oe_2/./scripts/runqemu", line 624, in check_args s = re.search('^DEPLOY_DIR_IMAGE="(.*)"', self.bitbake_e, re.M) File "/usr/lib/python3.13/re/__init__.py", line 177, in search return _compile(pattern, flags).search(string) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^ TypeError: expected string or bytes-like object, got 'NoneType' ``` This patch adds a more helpful error message to inform the user that bitbake was not found, e.g. because oe-init-build-env was not sourced. This is an example of the new error message after the patch: ``` runqemu - ERROR - In order for this script to dynamically infer paths kernels or filesystem images, you either need bitbake in your PATH or to source oe-init-build-env before running this script. Dynamic path inference can be avoided by passing a *.qemuboot.conf to runqemu, i.e. `runqemu /path/to/my-image-name.qemuboot.conf` Bitbake is needed to run 'bitbake -e', but it is not found in PATH. Please source the bitbake build environment. ``` CC: Richard Purdie CC: Alexander Kanavin (From OE-Core rev: c9744f2d294f5baa8c4c9c795eb73d269f943b0c) Signed-off-by: Richard GrĂ¼nert Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- scripts/runqemu | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/runqemu b/scripts/runqemu index 32c7a2aab3b..c28980e6163 100755 --- a/scripts/runqemu +++ b/scripts/runqemu @@ -1714,9 +1714,6 @@ to your build configuration. self.cleaned = True def run_bitbake_env(self, mach=None, target=''): - bitbake = shutil.which('bitbake') - if not bitbake: - return if not mach: mach = self.get('MACHINE') @@ -1733,6 +1730,10 @@ to your build configuration. else: cmd = 'bitbake -e %s %s' % (multiconfig, target) + bitbake = shutil.which('bitbake') + if not bitbake: + raise OEPathError("Bitbake is needed to run '%s', but it is not found in PATH. Please source the bitbake build environment." % cmd.strip()) + logger.info('Running %s...' % cmd) try: return subprocess.check_output(cmd, shell=True).decode('utf-8') From patchwork Tue Oct 7 12:46:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 71771 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D03ACCCA472 for ; Tue, 7 Oct 2025 12:47:03 +0000 (UTC) Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by mx.groups.io with SMTP id smtpd.web10.17789.1759841218085321265 for ; Tue, 07 Oct 2025 05:46:58 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=GZrNSSxK; spf=pass (domain: gmail.com, ip: 209.85.221.50, mailfrom: alex.kanavin@gmail.com) Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-3fa528f127fso4690673f8f.1 for ; Tue, 07 Oct 2025 05:46:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759841216; x=1760446016; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xPn4MSevijL2eg8BwtYSRrTk/4ZLpi7TFaXtwygHfPQ=; b=GZrNSSxKQzYOihelVbS1pX+J1ozay3btN21Is1vS+wmXYpvt2mhTYqYWvd7L37Yvh8 KoikNDGhMsPXduimQSyl7bXafd5Ofi8gmtdyLl6AFOVDGwoImlIWVZE2LIMIVmnWxfsa ovnmOPvZDpzQLRklxVLa7iRDiDkyPz/Fkk2gUaslTt1C8G+PdUOqdBpv2iDF06tCBZB/ JCevZ4Tp6pSWT8s35L5NhwnRFXHENTc5UM0JfdXEJPQThLOIdf5Rx0n867x6sXqpwrxI BjuBwdn8nB1RtOasWw+qe+HFIrvG+PindO5t1sw5SAgDxyvI9UXTHIZ/q+2AOB31je56 zXWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759841216; x=1760446016; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xPn4MSevijL2eg8BwtYSRrTk/4ZLpi7TFaXtwygHfPQ=; b=I/Ap4ArOlgYKwlJJ31hALh26oqmtNjmkQh1EvbyadnJulpFSnk0TnnnFlRtcfFxogB bEKje8epHHq+PgMjRzBz16r0QKdIvEDnD8zpHgiCsQByXXBH6voDb9yluOiFxsAQWLU9 5eBHJUm8CvljhvJ+iVIkKiekvZ6n6hqb9BkF6MQbxOwsrOD1i1m+Iy/PAn56lRklE8UH jxK46D3mPpj54e6igREhxaSq+UiudzpDN08WOJbQMnVx809+YxNv9IAgG9kC2WgAX54O wvGyqFbth+9/Yfhg6pd7OtF77B/k7waZXj2jgIc3TNGo3ij+cI02rk9l1cWCJJHMAcjA KGJA== X-Gm-Message-State: AOJu0YwNIFxvJgSkgi0wI9ARH14v8CuxIRIIEoiP07cr74w1QHu4z2as 8WiqMFX3WtcL6dotKsXvwUDa2Fd2mFpIceDO7MKXqb9jUIkDMnCzYX+dS9u8Uw== X-Gm-Gg: ASbGnculORKXzjVtiyqFibOgQ3EUlslp9l1pxv7xxG6SI4TtZKIVDA88huW4iHauRRo ripfGA1G/aDi+8UyD3h5IrO7Si7e7IMxpm+HlVfHr0UxiXMflR5kgfBFvIBhDQaxxLwyx+D7V4g XVO4mxxHXRtsueXztzKPFLD2w4Xtd28MHUUbqkYkGkNHJtPlm9Iucdf73gsAmEjxVtdEauwXV8r +TCJtL969ajVqOIxrPMUz9rjL95nbfEcmljbFr7yqmRKj4Eh6g/3M7A/ubwmQkcMC0RdpmJeFnl sM4kR3eVpsSLevhyRxzZ3pTjsi4tK0aXH9t3o9KNF8f4u3m3Te/aQQQoENLiEbxRqmPBIxAYi9c Mv5ukjkfUCaq5qy86Sdx8yz196Q9nFfw3+4XiknMGRhvJ9nnjgGYBtqI6LZF1R7PkWXjj87dhAM MBjz9Ex+4yXyN8NFx6CYR7t0RGlmAWIc88IJff3Kh3WiJuCs6KXelr+jpnhUPz2O/+Xh83kRAFz Q0ujHkbdQ== X-Google-Smtp-Source: AGHT+IFrQhP6S431fM1RW8MXbadDRqY/E1XsWtCjzBxxoklY27LVuA8ZhCzQOAYpAuMrE50pOvnY+w== X-Received: by 2002:a05:6000:24c4:b0:3f4:ad3f:7c35 with SMTP id ffacd0b85a97d-42582a0534bmr1975669f8f.27.1759841216077; Tue, 07 Oct 2025 05:46:56 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-46e7234f547sm222707325e9.9.2025.10.07.05.46.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Oct 2025 05:46:55 -0700 (PDT) From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH 2/3] runqemu: ensure that bitbake environment is either returned, or an exception is raised Date: Tue, 7 Oct 2025 14:46:51 +0200 Message-Id: <20251007124652.259629-2-alex.kanavin@gmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20251007124652.259629-1-alex.kanavin@gmail.com> References: <20251007124652.259629-1-alex.kanavin@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 07 Oct 2025 12:47:03 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/224532 From: Alexander Kanavin This eliminates the other remaining code path where environment getter returns 'nothing'. This and the previous patch were tested in a-full, and no errors occurred [1], which means the code paths that make use of the function returning nothing are never actually executed and can be cleaned up (in the following patch). The rationale is that if environment getter cannot obtain the environment, it should report that and not sweep the issue under the carpet; it's up to the caller to handle that situation, or make pre-emptive checks that avoid calling the environment getter when it is bound to fail. [1] https://lists.openembedded.org/g/openembedded-core/message/223651 Signed-off-by: Alexander Kanavin --- scripts/runqemu | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/runqemu b/scripts/runqemu index c28980e6163..1e8406e1194 100755 --- a/scripts/runqemu +++ b/scripts/runqemu @@ -1745,11 +1745,7 @@ to your build configuration. cmd = 'MACHINE=%s bitbake -e %s %s' % (mach, multiconfig, target) else: cmd = 'bitbake -e %s %s' % (multiconfig, target) - try: - return subprocess.check_output(cmd, shell=True).decode('utf-8') - except subprocess.CalledProcessError as err: - logger.warning("Couldn't run '%s' to gather environment information, giving up with 'bitbake -e':\n%s" % (cmd, err.output.decode('utf-8'))) - return '' + return subprocess.check_output(cmd, shell=True).decode('utf-8') def load_bitbake_env(self, mach=None, target=None): From patchwork Tue Oct 7 12:46:52 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 71769 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5CB5CCA476 for ; Tue, 7 Oct 2025 12:47:03 +0000 (UTC) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by mx.groups.io with SMTP id smtpd.web11.17872.1759841218883753172 for ; Tue, 07 Oct 2025 05:46:59 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gqH/sX2r; spf=pass (domain: gmail.com, ip: 209.85.128.47, mailfrom: alex.kanavin@gmail.com) Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-46e33b260b9so59053075e9.2 for ; Tue, 07 Oct 2025 05:46:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759841217; x=1760446017; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=o4gIp8fQkHcJ0/la6u6WRI0pTOofOXskktVxMee/J4w=; b=gqH/sX2rIx+X+Zs4y9NnXaaenew7bspARHFEHo4bh3fOITE3DcC6cZts1p3F36fW2S lBFLbjPoOyQGrHtjT39xUbVJwKaBP5SUvQbxQHgyWOO3N6WJhlmwcHlbnL8UHi000GsQ QnP1g10cYQ/2DNr6upU67zh/f78gL1xiA5QiV4D5vBhfgFkOgo/W0Plp+EIdjvcsBl/s uriqBlaFR7iPVb8uFUcc8ne4+297tCLDiVCKvT92EMzNLSdrfc1G6NCbVdebo2GUidV7 QhEdhp2MMnQhJlgtJ9WBZjLx0AxqMpLd9uC0bTN9NL/YMSiGLrR0/O8MnDwuGLGWieMh R96A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759841217; x=1760446017; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=o4gIp8fQkHcJ0/la6u6WRI0pTOofOXskktVxMee/J4w=; b=liyWT+lkbvlygJC+sJM/Uv/AVgxGIUXHIskx2sA+jhIwN3v9OwLjKNHbj7nqs1AdDs FKE06IQv+x8N2CJC7FKN0vCgjtSWNoSOd0vnpYxiAf5Lzf5K1vR9rha/4SSAIrPD8EPz hQjrrCw/+mDJN+/mBQpOcI46nifGXv7q5c0e6a3rQ3dFQT9CLrsS6Hu3tUQ+NNLre4/o NA0ztPypSEyztJzoywU4je5ubdCGa4PXNZ5M033Unw3g9cYxC/1IEY9npG9FXQH3s7GC CWdfjXEBEKU2jNL2seJld+KwXTUbWK8ZPoysWHj5QUgbynY8KdhtPgSBWVszfgvVnoAn DwyQ== X-Gm-Message-State: AOJu0Yy5MSAuXh3RexzuiSfKQnhLUz6mMidyMI5xBFmV93LbLYGI05RE xUUP8Ghx+ozXX9fykM2NdMXODa6cqop397VAZOWFY4fTRHLL1+CUe1LTPQFe9w== X-Gm-Gg: ASbGncs+fpwI6Fx5/LMDrWjL1KBQYVAbCmLJZRjXuonVwxTqadx/nEOHqWaECRJrJSz R6fieUCWonLv0RrJezEfm7713luy777rW9LNAZIhZkAVH2nm4Ld8lofF4x1ca6/U27bp4TEdMCM x+A++l81G+AyxRS9WK2AM2MIM3AIc9vpCnHJE2EywJmyZ57eCOPigPUzu7GNC1gZ65XkkHAduox 5IuAArJveH9F40gbYbOVi1SOiAYqknmrWvYQX/sOPg1ZuYAYEftGWCBeC63rqSpNU+KNITXV/e9 qF94Gsdys8pvyAN1Sz0vaWmDRk2g9TQslwGm/2w7nb+57BftRlHlG80D47R6hru7RA1j2auHNmO rg69k3mSe5zoSr8F95+nLdSRzQ7ibfa7Fc6ZtKxRI2+8tYC5Ir2ClV609nQnwokkEG1LR8Pol7v j5FefgPzA4NaFKn61PHUz/zzZNjCc4cH21Bq7op6FYO7qNpIo/C+5L9RHCwfOifsZ2ov0eRgiJ2 1vVlzcHYg== X-Google-Smtp-Source: AGHT+IFgqeVv7wJFe9opjVS8WpQ8CaYnDbq3dK6Y8QCJILex917EDHqXwauSQ+3APSqyQflSSqRgxQ== X-Received: by 2002:a05:600c:c4a8:b0:46e:4c7c:515c with SMTP id 5b1f17b1804b1-46e711549a1mr98725005e9.34.1759841216964; Tue, 07 Oct 2025 05:46:56 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-46e7234f547sm222707325e9.9.2025.10.07.05.46.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Oct 2025 05:46:56 -0700 (PDT) From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH 3/3] scripts/runqemu: remove the code block that works around the missing bitbake environment Date: Tue, 7 Oct 2025 14:46:52 +0200 Message-Id: <20251007124652.259629-3-alex.kanavin@gmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20251007124652.259629-1-alex.kanavin@gmail.com> References: <20251007124652.259629-1-alex.kanavin@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 07 Oct 2025 12:47:03 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/224533 From: Alexander Kanavin As confirmed by the previous patch this code path is never taken and can be removed. Signed-off-by: Alexander Kanavin --- scripts/runqemu | 34 ++++++---------------------------- 1 file changed, 6 insertions(+), 28 deletions(-) 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:']