diff options
| -rw-r--r-- | meta/lib/oe/sstatesig.py | 11 |
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 @@ | |||
| 6 | import bb.siggen | 6 | import bb.siggen |
| 7 | import bb.runqueue | 7 | import bb.runqueue |
| 8 | import oe | 8 | import oe |
| 9 | import netrc | ||
| 9 | 10 | ||
| 10 | def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCaches): | 11 | def 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 |
| 332 | bb.siggen.SignatureGeneratorOEBasicHash = SignatureGeneratorOEBasicHash | 343 | bb.siggen.SignatureGeneratorOEBasicHash = SignatureGeneratorOEBasicHash |
