summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/cooker.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 9537239b03..4f01cc10c6 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -138,6 +138,13 @@ class BBCooker:
138 if not self.configuration.cmd: 138 if not self.configuration.cmd:
139 self.configuration.cmd = bb.data.getVar("BB_DEFAULT_TASK", self.configuration.data, True) or "build" 139 self.configuration.cmd = bb.data.getVar("BB_DEFAULT_TASK", self.configuration.data, True) or "build"
140 140
141 # Take a lock so only one copy of bitbake can run against a given build
142 # directory at a time
143 lockfile = bb.data.expand("${TOPDIR}/bitbake.lock", self.configuration.data)
144 self.lock = bb.utils.lockfile(lockfile, False, False)
145 if not self.lock:
146 bb.fatal("Only one copy of bitbake should be run against a build directory")
147
141 bbpkgs = bb.data.getVar('BBPKGS', self.configuration.data, True) 148 bbpkgs = bb.data.getVar('BBPKGS', self.configuration.data, True)
142 if bbpkgs and len(self.configuration.pkgs_to_build) == 0: 149 if bbpkgs and len(self.configuration.pkgs_to_build) == 0:
143 self.configuration.pkgs_to_build.extend(bbpkgs.split()) 150 self.configuration.pkgs_to_build.extend(bbpkgs.split())