1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-02 13:29:49 +00:00

bitbake: bb: Use namedtuple for Task data

Task dependency data is becoming unwieldy with the number of indices it
contains. Convert it to use a named tuple instead, which allows members
to be indexed by a named property or an index (which allows it to retain
backward compatibility).

(Bitbake rev: 26446cca4d22734c3f1b328a205c169dadb7e494)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Joshua Watt
2024-05-23 12:17:58 -06:00
committed by Richard Purdie
parent e598b2d135
commit d31c64296d
2 changed files with 39 additions and 18 deletions
+12
View File
@@ -36,6 +36,7 @@ class BBHandledException(Exception):
import os
import logging
from collections import namedtuple
class NullHandler(logging.Handler):
@@ -227,3 +228,14 @@ def deprecate_import(current, modulename, fromlist, renames = None):
setattr(sys.modules[current], newname, newobj)
TaskData = namedtuple("TaskData", [
"pn",
"taskname",
"fn",
"deps",
"provides",
"taskhash",
"unihash",
"hashfn",
"taskhash_deps",
])