summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oe')
-rw-r--r--meta/lib/oe/sstatesig.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index aa891ecf0a..b867e2a052 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -6,6 +6,7 @@
6import bb.siggen 6import bb.siggen
7import bb.runqueue 7import bb.runqueue
8import oe 8import oe
9import netrc
9 10
10def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCaches): 11def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCaches):
11 # Return True if we should keep the dependency, False to drop it 12 # Return True if we should keep the dependency, False to drop it
@@ -327,6 +328,16 @@ class SignatureGeneratorOEEquivHash(SignatureGeneratorOEBasicHashMixIn, bb.sigge
327 if not self.method: 328 if not self.method:
328 bb.fatal("OEEquivHash requires SSTATE_HASHEQUIV_METHOD to be set") 329 bb.fatal("OEEquivHash requires SSTATE_HASHEQUIV_METHOD to be set")
329 self.max_parallel = int(data.getVar('BB_HASHSERVE_MAX_PARALLEL') or 1) 330 self.max_parallel = int(data.getVar('BB_HASHSERVE_MAX_PARALLEL') or 1)
331 self.username = data.getVar("BB_HASHSERVE_USERNAME")
332 self.password = data.getVar("BB_HASHSERVE_PASSWORD")
333 if not self.username or not self.password:
334 try:
335 n = netrc.netrc()
336 auth = n.authenticators(self.server)
337 if auth is not None:
338 self.username, _, self.password = auth
339 except FileNotFoundError:
340 pass
330 341
331# Insert these classes into siggen's namespace so it can see and select them 342# Insert these classes into siggen's namespace so it can see and select them
332bb.siggen.SignatureGeneratorOEBasicHash = SignatureGeneratorOEBasicHash 343bb.siggen.SignatureGeneratorOEBasicHash = SignatureGeneratorOEBasicHash