]> code.ossystems Code Review - openembedded-core.git/commitdiff
package_manager/ipk: neaten OPKGLIBDIR logic
authorRoss Burton <ross@burtonini.com>
Tue, 1 Dec 2020 15:23:04 +0000 (15:23 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 3 Dec 2020 22:52:27 +0000 (22:52 +0000)
oe.path.join handles path components starting with / for us.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/package_manager/ipk/__init__.py

index 416ed23d47485e40747a575c6e51a176b7ea0ea0..2753b139ed126b1c7052417cf3342111ed0d60d7 100644 (file)
@@ -172,12 +172,7 @@ class OpkgPM(OpkgDpkgPM):
         if prepare_index:
             create_packages_dir(self.d, self.deploy_dir, d.getVar("DEPLOY_DIR_IPK"), "package_write_ipk", filterbydependencies)
 
-        opkg_lib_dir = self.d.getVar('OPKGLIBDIR')
-        if opkg_lib_dir[0] == "/":
-            opkg_lib_dir = opkg_lib_dir[1:]
-
-        self.opkg_dir = os.path.join(target_rootfs, opkg_lib_dir, "opkg")
-
+        self.opkg_dir = oe.path.join(target_rootfs, self.d.getVar('OPKGLIBDIR'), "opkg")
         bb.utils.mkdirhier(self.opkg_dir)
 
         self.saved_opkg_dir = self.d.expand('${T}/saved/%s' % self.task_name)