diff options
author | Laurentiu Palcu <laurentiu.palcu@intel.com> | 2014-01-28 14:43:14 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-02-11 11:50:31 +0000 |
commit | 127d19b84e78b5e650d0e6d7eaf29a8b7d799e5e (patch) | |
tree | 055f433da9676ac1558506f3f9ddd164b3412a53 /meta | |
parent | e2c3c59b26d84cd4052a953adafcd4d456264c26 (diff) | |
download | openembedded-core-127d19b84e78b5e650d0e6d7eaf29a8b7d799e5e.tar.gz openembedded-core-127d19b84e78b5e650d0e6d7eaf29a8b7d799e5e.tar.bz2 openembedded-core-127d19b84e78b5e650d0e6d7eaf29a8b7d799e5e.zip |
lib/oe/package_manager.py: DpkgPM, use lock on deploy dir
Lock deploy directory against concurrent index creation.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oe/package_manager.py | 8 |
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) |