diff mbox series

[scarthgap] runqemu: fix special characters bug

Message ID 20250717080929.3619031-1-libo.chen.cn@windriver.com
State Awaiting Upstream
Delegated to: Steve Sakoman
Headers show
Series [scarthgap] runqemu: fix special characters bug | expand

Commit Message

Chen, Libo (CN) July 17, 2025, 8:09 a.m. UTC
From: Libo Chen <libo.chen.cn@windriver.com>

Fix the following bug for runqemu with a file path which contains
vmlinux characters.

runqemu - ERROR - wic doesn't need kernel

Signed-off-by: Libo Chen <libo.chen.cn@windriver.com>
---
 scripts/runqemu | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

Steve Sakoman July 17, 2025, 4:57 p.m. UTC | #1
This should be submitted (and accepted) for the master branch before I
can take it for the stable branches.

Steve

On Thu, Jul 17, 2025 at 1:10 AM Chen, Libo (CN) via
lists.openembedded.org
<libo.chen.cn=windriver.com@lists.openembedded.org> wrote:
>
> From: Libo Chen <libo.chen.cn@windriver.com>
>
> Fix the following bug for runqemu with a file path which contains
> vmlinux characters.
>
> runqemu - ERROR - wic doesn't need kernel
>
> Signed-off-by: Libo Chen <libo.chen.cn@windriver.com>
> ---
>  scripts/runqemu | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/runqemu b/scripts/runqemu
> index 2ab36fd03d..f189dbfb60 100755
> --- a/scripts/runqemu
> +++ b/scripts/runqemu
> @@ -368,12 +368,13 @@ class BaseConfig(object):
>          - Check whether it is an NFS dir
>          - Check whether it is an OVMF flash file
>          """
> +        n = os.path.basename(p)
>          if p.endswith('.qemuboot.conf'):
>              self.qemuboot = p
>              self.qbconfload = True
> -        elif re.search('\\.bin$', p) or re.search('bzImage', p) or \
> -             re.search('zImage', p) or re.search('vmlinux', p) or \
> -             re.search('fitImage', p) or re.search('uImage', p):
> +        elif re.search('\\.bin$', n) or re.search('bzImage', n) or \
> +             re.search('zImage', n) or re.search('vmlinux', n) or \
> +             re.search('fitImage', n) or re.search('uImage', n):
>              self.kernel =  p
>          elif os.path.isfile(p) and ('-image-' in os.path.basename(p) or '.rootfs.' in os.path.basename(p)):
>              self.rootfs = p
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#220518): https://lists.openembedded.org/g/openembedded-core/message/220518
> Mute This Topic: https://lists.openembedded.org/mt/114199800/3620601
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [steve@sakoman.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/scripts/runqemu b/scripts/runqemu
index 2ab36fd03d..f189dbfb60 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -368,12 +368,13 @@  class BaseConfig(object):
         - Check whether it is an NFS dir
         - Check whether it is an OVMF flash file
         """
+        n = os.path.basename(p)
         if p.endswith('.qemuboot.conf'):
             self.qemuboot = p
             self.qbconfload = True
-        elif re.search('\\.bin$', p) or re.search('bzImage', p) or \
-             re.search('zImage', p) or re.search('vmlinux', p) or \
-             re.search('fitImage', p) or re.search('uImage', p):
+        elif re.search('\\.bin$', n) or re.search('bzImage', n) or \
+             re.search('zImage', n) or re.search('vmlinux', n) or \
+             re.search('fitImage', n) or re.search('uImage', n):
             self.kernel =  p
         elif os.path.isfile(p) and ('-image-' in os.path.basename(p) or '.rootfs.' in os.path.basename(p)):
             self.rootfs = p