summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/taskdata.py
diff options
context:
space:
mode:
authorJoshua Watt <JPEWhacker@gmail.com>2021-02-09 09:50:21 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-02-10 23:48:16 +0000
commit75f87db413f3659fee18eff389b7b339b01cce15 (patch)
treee733135549b516c72c4f34172b6bbf865377fc76 /bitbake/lib/bb/taskdata.py
parent7283a0b3b6ca49d0d2e13593333a580ef10439a8 (diff)
downloadpoky-75f87db413f3659fee18eff389b7b339b01cce15.tar.gz
bitbake: logging: Make bitbake logger compatible with python logger
The bitbake logger overrode the definition of the debug() logging call to include a debug level, but this causes problems with code that may be using standard python logging, since the extra argument is interpreted differently. Instead, change the bitbake loggers debug() call to match the python logger call and add a debug2() and debug3() API to replace calls that were logging to a different debug level. [RP: Small fix to ensure bb.debug calls bbdebug()] (Bitbake rev: f68682a79d83e6399eb403f30a1f113516575f51) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/taskdata.py')
-rw-r--r--bitbake/lib/bb/taskdata.py42
1 files changed, 21 insertions, 21 deletions
diff --git a/bitbake/lib/bb/taskdata.py b/bitbake/lib/bb/taskdata.py
index ffbaf362e8..47bad6d1fa 100644
--- a/bitbake/lib/bb/taskdata.py
+++ b/bitbake/lib/bb/taskdata.py
@@ -131,7 +131,7 @@ class TaskData:
131 for depend in dataCache.deps[fn]: 131 for depend in dataCache.deps[fn]:
132 dependids.add(depend) 132 dependids.add(depend)
133 self.depids[fn] = list(dependids) 133 self.depids[fn] = list(dependids)
134 logger.debug(2, "Added dependencies %s for %s", str(dataCache.deps[fn]), fn) 134 logger.debug2("Added dependencies %s for %s", str(dataCache.deps[fn]), fn)
135 135
136 # Work out runtime dependencies 136 # Work out runtime dependencies
137 if not fn in self.rdepids: 137 if not fn in self.rdepids:
@@ -149,9 +149,9 @@ class TaskData:
149 rreclist.append(rdepend) 149 rreclist.append(rdepend)
150 rdependids.add(rdepend) 150 rdependids.add(rdepend)
151 if rdependlist: 151 if rdependlist:
152 logger.debug(2, "Added runtime dependencies %s for %s", str(rdependlist), fn) 152 logger.debug2("Added runtime dependencies %s for %s", str(rdependlist), fn)
153 if rreclist: 153 if rreclist:
154 logger.debug(2, "Added runtime recommendations %s for %s", str(rreclist), fn) 154 logger.debug2("Added runtime recommendations %s for %s", str(rreclist), fn)
155 self.rdepids[fn] = list(rdependids) 155 self.rdepids[fn] = list(rdependids)
156 156
157 for dep in self.depids[fn]: 157 for dep in self.depids[fn]:
@@ -378,7 +378,7 @@ class TaskData:
378 for fn in eligible: 378 for fn in eligible:
379 if fn in self.failed_fns: 379 if fn in self.failed_fns:
380 continue 380 continue
381 logger.debug(2, "adding %s to satisfy %s", fn, item) 381 logger.debug2("adding %s to satisfy %s", fn, item)
382 self.add_build_target(fn, item) 382 self.add_build_target(fn, item)
383 self.add_tasks(fn, dataCache) 383 self.add_tasks(fn, dataCache)
384 384
@@ -431,7 +431,7 @@ class TaskData:
431 for fn in eligible: 431 for fn in eligible:
432 if fn in self.failed_fns: 432 if fn in self.failed_fns:
433 continue 433 continue
434 logger.debug(2, "adding '%s' to satisfy runtime '%s'", fn, item) 434 logger.debug2("adding '%s' to satisfy runtime '%s'", fn, item)
435 self.add_runtime_target(fn, item) 435 self.add_runtime_target(fn, item)
436 self.add_tasks(fn, dataCache) 436 self.add_tasks(fn, dataCache)
437 437
@@ -446,7 +446,7 @@ class TaskData:
446 return 446 return
447 if not missing_list: 447 if not missing_list:
448 missing_list = [] 448 missing_list = []
449 logger.debug(1, "File '%s' is unbuildable, removing...", fn) 449 logger.debug("File '%s' is unbuildable, removing...", fn)
450 self.failed_fns.append(fn) 450 self.failed_fns.append(fn)
451 for target in self.build_targets: 451 for target in self.build_targets:
452 if fn in self.build_targets[target]: 452 if fn in self.build_targets[target]:
@@ -526,7 +526,7 @@ class TaskData:
526 added = added + 1 526 added = added + 1
527 except (bb.providers.NoRProvider, bb.providers.MultipleRProvider): 527 except (bb.providers.NoRProvider, bb.providers.MultipleRProvider):
528 self.remove_runtarget(target) 528 self.remove_runtarget(target)
529 logger.debug(1, "Resolved " + str(added) + " extra dependencies") 529 logger.debug("Resolved " + str(added) + " extra dependencies")
530 if added == 0: 530 if added == 0:
531 break 531 break
532 # self.dump_data() 532 # self.dump_data()
@@ -549,38 +549,38 @@ class TaskData:
549 """ 549 """
550 Dump some debug information on the internal data structures 550 Dump some debug information on the internal data structures
551 """ 551 """
552 logger.debug(3, "build_names:") 552 logger.debug3("build_names:")
553 logger.debug(3, ", ".join(self.build_targets)) 553 logger.debug3(", ".join(self.build_targets))
554 554
555 logger.debug(3, "run_names:") 555 logger.debug3("run_names:")
556 logger.debug(3, ", ".join(self.run_targets)) 556 logger.debug3(", ".join(self.run_targets))
557 557
558 logger.debug(3, "build_targets:") 558 logger.debug3("build_targets:")
559 for target in self.build_targets: 559 for target in self.build_targets:
560 targets = "None" 560 targets = "None"
561 if target in self.build_targets: 561 if target in self.build_targets:
562 targets = self.build_targets[target] 562 targets = self.build_targets[target]
563 logger.debug(3, " %s: %s", target, targets) 563 logger.debug3(" %s: %s", target, targets)
564 564
565 logger.debug(3, "run_targets:") 565 logger.debug3("run_targets:")
566 for target in self.run_targets: 566 for target in self.run_targets:
567 targets = "None" 567 targets = "None"
568 if target in self.run_targets: 568 if target in self.run_targets:
569 targets = self.run_targets[target] 569 targets = self.run_targets[target]
570 logger.debug(3, " %s: %s", target, targets) 570 logger.debug3(" %s: %s", target, targets)
571 571
572 logger.debug(3, "tasks:") 572 logger.debug3("tasks:")
573 for tid in self.taskentries: 573 for tid in self.taskentries:
574 logger.debug(3, " %s: %s %s %s", 574 logger.debug3(" %s: %s %s %s",
575 tid, 575 tid,
576 self.taskentries[tid].idepends, 576 self.taskentries[tid].idepends,
577 self.taskentries[tid].irdepends, 577 self.taskentries[tid].irdepends,
578 self.taskentries[tid].tdepends) 578 self.taskentries[tid].tdepends)
579 579
580 logger.debug(3, "dependency ids (per fn):") 580 logger.debug3("dependency ids (per fn):")
581 for fn in self.depids: 581 for fn in self.depids:
582 logger.debug(3, " %s: %s", fn, self.depids[fn]) 582 logger.debug3(" %s: %s", fn, self.depids[fn])
583 583
584 logger.debug(3, "runtime dependency ids (per fn):") 584 logger.debug3("runtime dependency ids (per fn):")
585 for fn in self.rdepids: 585 for fn in self.rdepids:
586 logger.debug(3, " %s: %s", fn, self.rdepids[fn]) 586 logger.debug3(" %s: %s", fn, self.rdepids[fn])