summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/siggen.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-12-09 17:06:08 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-12-11 23:21:27 +0000
commita40875b7271cc1737cc42b14e185ce4a63662036 (patch)
tree906f382a3b7dc4067fd4b2ca1b297f427ff72e04 /bitbake/lib/bb/siggen.py
parentd6eadc937ad2d50cd91bf7eec28f970c1afd9937 (diff)
downloadpoky-a40875b7271cc1737cc42b14e185ce4a63662036.tar.gz
bitbake: siggen: Drop non-multiconfig aware siggen support
All siggens in common use should now support multiconfig, drop the compatibility code. (Bitbake rev: b36545b4df6d935ed312ff407d4e0474c3ed8d1a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/siggen.py')
-rw-r--r--bitbake/lib/bb/siggen.py49
1 files changed, 0 insertions, 49 deletions
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index 3731cd6b69..be56b3a31c 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -53,11 +53,6 @@ class SignatureGenerator(object):
53 """ 53 """
54 name = "noop" 54 name = "noop"
55 55
56 # If the derived class supports multiconfig datacaches, set this to True
57 # The default is False for backward compatibility with derived signature
58 # generators that do not understand multiconfig caches
59 supports_multiconfig_datacaches = False
60
61 def __init__(self, data): 56 def __init__(self, data):
62 self.basehash = {} 57 self.basehash = {}
63 self.taskhash = {} 58 self.taskhash = {}
@@ -128,38 +123,6 @@ class SignatureGenerator(object):
128 def set_setscene_tasks(self, setscene_tasks): 123 def set_setscene_tasks(self, setscene_tasks):
129 return 124 return
130 125
131 @classmethod
132 def get_data_caches(cls, dataCaches, mc):
133 """
134 This function returns the datacaches that should be passed to signature
135 generator functions. If the signature generator supports multiconfig
136 caches, the entire dictionary of data caches is sent, otherwise a
137 special proxy is sent that support both index access to all
138 multiconfigs, and also direct access for the default multiconfig.
139
140 The proxy class allows code in this class itself to always use
141 multiconfig aware code (to ease maintenance), but derived classes that
142 are unaware of multiconfig data caches can still access the default
143 multiconfig as expected.
144
145 Do not override this function in derived classes; it will be removed in
146 the future when support for multiconfig data caches is mandatory
147 """
148 class DataCacheProxy(object):
149 def __init__(self):
150 pass
151
152 def __getitem__(self, key):
153 return dataCaches[key]
154
155 def __getattr__(self, name):
156 return getattr(dataCaches[mc], name)
157
158 if cls.supports_multiconfig_datacaches:
159 return dataCaches
160
161 return DataCacheProxy()
162
163 def exit(self): 126 def exit(self):
164 return 127 return
165 128
@@ -298,11 +261,6 @@ class SignatureGeneratorBasic(SignatureGenerator):
298 for dep in sorted(deps, key=clean_basepath): 261 for dep in sorted(deps, key=clean_basepath):
299 (depmc, _, _, depmcfn) = bb.runqueue.split_tid_mcfn(dep) 262 (depmc, _, _, depmcfn) = bb.runqueue.split_tid_mcfn(dep)
300 depname = dataCaches[depmc].pkg_fn[depmcfn] 263 depname = dataCaches[depmc].pkg_fn[depmcfn]
301 if not self.supports_multiconfig_datacaches and mc != depmc:
302 # If the signature generator doesn't understand multiconfig
303 # data caches, any dependency not in the same multiconfig must
304 # be skipped for backward compatibility
305 continue
306 if not self.rundep_check(fn, recipename, task, dep, depname, dataCaches): 264 if not self.rundep_check(fn, recipename, task, dep, depname, dataCaches):
307 continue 265 continue
308 if dep not in self.taskhash: 266 if dep not in self.taskhash:
@@ -726,13 +684,6 @@ class SignatureGeneratorTestEquivHash(SignatureGeneratorUniHashMixIn, SignatureG
726 self.server = data.getVar('BB_HASHSERVE') 684 self.server = data.getVar('BB_HASHSERVE')
727 self.method = "sstate_output_hash" 685 self.method = "sstate_output_hash"
728 686
729#
730# Dummy class used for bitbake-selftest
731#
732class SignatureGeneratorTestMulticonfigDepends(SignatureGeneratorBasicHash):
733 name = "TestMulticonfigDepends"
734 supports_multiconfig_datacaches = True
735
736def dump_this_task(outfile, d): 687def dump_this_task(outfile, d):
737 import bb.parse 688 import bb.parse
738 fn = d.getVar("BB_FILENAME") 689 fn = d.getVar("BB_FILENAME")