diff options
Diffstat (limited to 'meta/lib/oe/package_manager.py')
-rw-r--r-- | meta/lib/oe/package_manager.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py index 93ca78acb2..f84644c62d 100644 --- a/meta/lib/oe/package_manager.py +++ b/meta/lib/oe/package_manager.py | |||
@@ -27,6 +27,8 @@ class PackageManager(object): | |||
27 | 27 | ||
28 | def __init__(self, d): | 28 | def __init__(self, d): |
29 | self.d = d | 29 | self.d = d |
30 | self.deploy_dir = None | ||
31 | self.deploy_lock = None | ||
30 | 32 | ||
31 | """ | 33 | """ |
32 | Update the package manager package database. | 34 | Update the package manager package database. |
@@ -110,6 +112,21 @@ class PackageManager(object): | |||
110 | 112 | ||
111 | self.install(complementary_pkgs.split(), attempt_only=True) | 113 | self.install(complementary_pkgs.split(), attempt_only=True) |
112 | 114 | ||
115 | def deploy_dir_lock(self): | ||
116 | if self.deploy_dir is None: | ||
117 | raise RuntimeError("deploy_dir is not set!") | ||
118 | |||
119 | lock_file_name = os.path.join(self.deploy_dir, "deploy.lock") | ||
120 | |||
121 | self.deploy_lock = bb.utils.lockfile(lock_file_name) | ||
122 | |||
123 | def deploy_dir_unlock(self): | ||
124 | if self.deploy_lock is None: | ||
125 | return | ||
126 | |||
127 | bb.utils.unlockfile(self.deploy_lock) | ||
128 | |||
129 | self.deploy_lock = None | ||
113 | 130 | ||
114 | class RpmPM(PackageManager): | 131 | class RpmPM(PackageManager): |
115 | def __init__(self): | 132 | def __init__(self): |