]> code.ossystems Code Review - openembedded-core.git/commitdiff
package_manager.py: specify tmpdir for opkg
authorChen Qi <Qi.Chen@windriver.com>
Wed, 15 Jun 2016 09:40:56 +0000 (17:40 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 23 Jun 2016 13:21:37 +0000 (14:21 +0100)
Specify tmpdir for opkg via '-t' option so that opkg does not use
the default 'TMPDIR' which usually is '/tmp' on build host.

This would solve race problems like below.

  sh: /tmp/opkg-rOG6Tl/opkg-intercept-iPoEp5/depmod: Permission denied

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/lib/oe/package_manager.py

index bc22c5fc75e78a276d2eb9d75f4231b6713443b0..717246d3831292dab67dd0d31009f4951a4579fe 100644 (file)
@@ -1563,7 +1563,7 @@ class OpkgPM(OpkgDpkgPM):
         self.deploy_dir = self.d.getVar("DEPLOY_DIR_IPK", True)
         self.deploy_lock_file = os.path.join(self.deploy_dir, "deploy.lock")
         self.opkg_cmd = bb.utils.which(os.getenv('PATH'), "opkg")
-        self.opkg_args = "--volatile-cache -f %s -o %s " % (self.config_file, target_rootfs)
+        self.opkg_args = "--volatile-cache -f %s -t %s -o %s " % (self.config_file, self.d.expand('${T}/ipktemp/') ,target_rootfs)
         self.opkg_args += self.d.getVar("OPKG_ARGS", True)
 
         opkg_lib_dir = self.d.getVar('OPKGLIBDIR', True)