Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Anders Heimer <anders.heimer@est.tech>
To: openembedded-core@lists.openembedded.org
Cc: Anders Heimer <anders.heimer@est.tech>
Subject: [PATCH] package_manager/ipk: fix dummy install arguments
Date: Mon, 15 Jun 2026 10:02:38 +0200	[thread overview]
Message-ID: <20260615080238.1367485-1-anders.heimer@est.tech> (raw)

Use self.config_file and the temporary rootfs arguments for both opkg
update and the noaction install in dummy_install().

Also convert the touched opkg update call away from shell=True.

Fixes: 7390e72669 ("classes/lib: Start to covert strings to lists...")

Signed-off-by: Anders Heimer <anders.heimer@est.tech>
---
 meta/lib/oe/package_manager/ipk/__init__.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/lib/oe/package_manager/ipk/__init__.py b/meta/lib/oe/package_manager/ipk/__init__.py
index 25d4e3ff2e..344e085217 100644
--- a/meta/lib/oe/package_manager/ipk/__init__.py
+++ b/meta/lib/oe/package_manager/ipk/__init__.py
@@ -380,18 +380,18 @@ class OpkgPM(OpkgDpkgPM):
         temp_opkg_dir = os.path.join(temp_rootfs, opkg_lib_dir, 'opkg')
         bb.utils.mkdirhier(temp_opkg_dir)
 
-        opkg_args = ['-f', config_file, '-o', temp_rootfs]
+        opkg_args = ['-f', self.config_file, '-o', temp_rootfs]
         opkg_args.extend(shlex.split(self.d.getVar("OPKG_ARGS")))
 
-        cmd = "%s %s update" % (self.opkg_cmd, opkg_args)
+        cmd = [self.opkg_cmd] + opkg_args + ['update']
         try:
-            subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
+            subprocess.check_output(cmd, stderr=subprocess.STDOUT)
         except subprocess.CalledProcessError as e:
             bb.fatal("Unable to update. Command '%s' "
                      "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
 
         # Dummy installation
-        cmd = [self.opkg_cmd] + self.opkg_args + ['--noaction', 'install'] + pkgs
+        cmd = [self.opkg_cmd] + opkg_args + ['--noaction', 'install'] + pkgs
         proc = subprocess.run(cmd, capture_output=True, encoding="utf-8")
         if proc.returncode:
             bb.fatal("Unable to dummy install packages. Command '%s' "


                 reply	other threads:[~2026-06-15  8:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260615080238.1367485-1-anders.heimer@est.tech \
    --to=anders.heimer@est.tech \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox