summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oe/package_manager.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 8a58d611be..2e5aa82568 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -1086,6 +1086,8 @@ class DpkgPM(PackageManager):
def update(self):
os.environ['APT_CONFIG'] = self.apt_conf_file
+ self.deploy_dir_lock()
+
cmd = "%s update" % self.apt_get_cmd
try:
@@ -1094,6 +1096,8 @@ class DpkgPM(PackageManager):
bb.fatal("Unable to update the package index files. Command %s "
"returned %d" % (e.cmd, e.returncode))
+ self.deploy_dir_unlock()
+
def install(self, pkgs, attempt_only=False):
os.environ['APT_CONFIG'] = self.apt_conf_file
@@ -1154,6 +1158,8 @@ class DpkgPM(PackageManager):
dpkg_scanpackages = bb.utils.which(os.getenv('PATH'), "dpkg-scanpackages")
gzip = bb.utils.which(os.getenv('PATH'), "gzip")
+ self.deploy_dir_lock()
+
index_cmds = []
deb_dirs_found = False
for arch in arch_list:
@@ -1178,6 +1184,8 @@ class DpkgPM(PackageManager):
pool.close()
pool.join()
+ self.deploy_dir_unlock()
+
for result in results:
if result is not None:
bb.fatal(result)