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 <[email protected]>
---
 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' "
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#238822): 
https://lists.openembedded.org/g/openembedded-core/message/238822
Mute This Topic: https://lists.openembedded.org/mt/119812242/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to