Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] package_manager/ipk: fix dummy install arguments
@ 2026-06-15  8:02 Anders Heimer
  0 siblings, 0 replies; only message in thread
From: Anders Heimer @ 2026-06-15  8:02 UTC (permalink / raw)
  To: openembedded-core; +Cc: Anders Heimer

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' "


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-15  8:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-15  8:02 [PATCH] package_manager/ipk: fix dummy install arguments Anders Heimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox