summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-05-08 11:56:22 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-05-12 08:45:36 +0100
commitc22953e8ec6d9dcf9f0877031ede61cd012f9493 (patch)
tree73d67c91f63f4557116e8242c34044a10ab23074 /meta/classes
parentc38d8a3352fa6fa87e748078710615548b5141dc (diff)
downloadpoky-c22953e8ec6d9dcf9f0877031ede61cd012f9493.tar.gz
staging: Allow BB_LIMITEDDEPS to avoid BB_TASKDEPDATA
In the limited dependency case we don't use any of the data from BB_TASKDEPDATA. Restructure the code so this variable doesn't have to be set. This allows the function to be called from other contexts without creating artificial constructs. There should be no functional change, behaviour remains unchanged. (From OE-Core rev: 71e5243e3ebadb90b45fe418dac3eaa2c1b896bd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/staging.bbclass32
1 files changed, 16 insertions, 16 deletions
diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass
index 565638f48d..9c2679406b 100644
--- a/meta/classes/staging.bbclass
+++ b/meta/classes/staging.bbclass
@@ -331,12 +331,26 @@ python extend_recipe_sysroot() {
331 331
332 taskdepdata = d.getVar("BB_TASKDEPDATA", False) 332 taskdepdata = d.getVar("BB_TASKDEPDATA", False)
333 mytaskname = d.getVar("BB_RUNTASK") 333 mytaskname = d.getVar("BB_RUNTASK")
334 if mytaskname.endswith("_setscene"):
335 mytaskname = mytaskname.replace("_setscene", "")
334 workdir = d.getVar("WORKDIR") 336 workdir = d.getVar("WORKDIR")
335 #bb.warn(str(taskdepdata)) 337 #bb.warn(str(taskdepdata))
336 pn = d.getVar("PN") 338 pn = d.getVar("PN")
337 339
338 if mytaskname.endswith("_setscene"): 340 stagingdir = d.getVar("STAGING_DIR")
339 mytaskname = mytaskname.replace("_setscene", "") 341 sharedmanifests = d.getVar("COMPONENTS_DIR") + "/manifests"
342 recipesysroot = d.getVar("RECIPE_SYSROOT")
343 recipesysrootnative = d.getVar("RECIPE_SYSROOT_NATIVE")
344 current_variant = d.getVar("BBEXTENDVARIANT")
345
346 # Detect bitbake -b usage
347 nodeps = d.getVar("BB_LIMITEDDEPS") or False
348 if nodeps:
349 lock = bb.utils.lockfile(recipesysroot + "/sysroot.lock")
350 staging_populate_sysroot_dir(recipesysroot, recipesysrootnative, True, d)
351 staging_populate_sysroot_dir(recipesysroot, recipesysrootnative, False, d)
352 bb.utils.unlockfile(lock)
353 return
340 354
341 start = None 355 start = None
342 configuredeps = [] 356 configuredeps = []
@@ -441,20 +455,6 @@ python extend_recipe_sysroot() {
441 455
442 bb.note("\n".join(msgbuf)) 456 bb.note("\n".join(msgbuf))
443 457
444 stagingdir = d.getVar("STAGING_DIR")
445 sharedmanifests = d.getVar("COMPONENTS_DIR") + "/manifests"
446 recipesysroot = d.getVar("RECIPE_SYSROOT")
447 recipesysrootnative = d.getVar("RECIPE_SYSROOT_NATIVE")
448 current_variant = d.getVar("BBEXTENDVARIANT")
449
450 # Detect bitbake -b usage
451 nodeps = d.getVar("BB_LIMITEDDEPS") or False
452 if nodeps:
453 lock = bb.utils.lockfile(recipesysroot + "/sysroot.lock")
454 staging_populate_sysroot_dir(recipesysroot, recipesysrootnative, True, d)
455 staging_populate_sysroot_dir(recipesysroot, recipesysrootnative, False, d)
456 bb.utils.unlockfile(lock)
457
458 depdir = recipesysrootnative + "/installeddeps" 458 depdir = recipesysrootnative + "/installeddeps"
459 bb.utils.mkdirhier(depdir) 459 bb.utils.mkdirhier(depdir)
460 bb.utils.mkdirhier(sharedmanifests) 460 bb.utils.mkdirhier(sharedmanifests)