diff options
| -rw-r--r-- | meta/classes/staging.bbclass | 36 | ||||
| -rw-r--r-- | meta/lib/oe/package_manager.py | 31 | ||||
| -rw-r--r-- | meta/lib/oe/sstatesig.py | 35 |
3 files changed, 41 insertions, 61 deletions
diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass index 1b9e84d97e..3fcbc9f15d 100644 --- a/meta/classes/staging.bbclass +++ b/meta/classes/staging.bbclass | |||
| @@ -470,40 +470,14 @@ python extend_recipe_sysroot() { | |||
| 470 | 470 | ||
| 471 | os.symlink(c + "." + taskhash, depdir + "/" + c) | 471 | os.symlink(c + "." + taskhash, depdir + "/" + c) |
| 472 | 472 | ||
| 473 | d2 = d | 473 | manifest, d2 = oe.sstatesig.find_sstate_manifest(c, setscenedeps[dep][2], "populate_sysroot", d, multilibs) |
| 474 | destsysroot = recipesysroot | 474 | destsysroot = d2.getVar("RECIPE_SYSROOT") |
| 475 | variant = '' | ||
| 476 | if setscenedeps[dep][2].startswith("virtual:multilib"): | ||
| 477 | variant = setscenedeps[dep][2].split(":")[2] | ||
| 478 | if variant != current_variant: | ||
| 479 | if variant not in multilibs: | ||
| 480 | multilibs[variant] = get_multilib_datastore(variant, d) | ||
| 481 | d2 = multilibs[variant] | ||
| 482 | destsysroot = d2.getVar("RECIPE_SYSROOT") | ||
| 483 | 475 | ||
| 484 | native = False | 476 | native = False |
| 485 | if c.endswith("-native"): | 477 | if c.endswith("-native") or "-cross-" in c or "-crosssdk" in c: |
| 486 | manifest = d2.expand("${SSTATE_MANIFESTS}/manifest-${BUILD_ARCH}-%s.populate_sysroot" % c) | ||
| 487 | native = True | 478 | native = True |
| 488 | elif c.startswith("nativesdk-"): | 479 | |
| 489 | manifest = d2.expand("${SSTATE_MANIFESTS}/manifest-${SDK_ARCH}_${SDK_OS}-%s.populate_sysroot" % c) | 480 | if manifest: |
| 490 | elif "-cross-" in c: | ||
| 491 | manifest = d2.expand("${SSTATE_MANIFESTS}/manifest-${BUILD_ARCH}_${TARGET_ARCH}-%s.populate_sysroot" % c) | ||
| 492 | native = True | ||
| 493 | elif "-crosssdk" in c: | ||
| 494 | manifest = d2.expand("${SSTATE_MANIFESTS}/manifest-${BUILD_ARCH}_${SDK_ARCH}_${SDK_OS}-%s.populate_sysroot" % c) | ||
| 495 | native = True | ||
| 496 | else: | ||
| 497 | pkgarchs = ['${MACHINE_ARCH}'] | ||
| 498 | pkgarchs = pkgarchs + list(reversed(d2.getVar("PACKAGE_EXTRA_ARCHS").split())) | ||
| 499 | pkgarchs.append('allarch') | ||
| 500 | for pkgarch in pkgarchs: | ||
| 501 | manifest = d2.expand("${SSTATE_MANIFESTS}/manifest-%s-%s.populate_sysroot" % (pkgarch, c)) | ||
| 502 | if os.path.exists(manifest): | ||
| 503 | break | ||
| 504 | if not os.path.exists(manifest): | ||
| 505 | bb.warn("Manifest %s not found?" % manifest) | ||
| 506 | else: | ||
| 507 | newmanifest = collections.OrderedDict() | 481 | newmanifest = collections.OrderedDict() |
| 508 | if native: | 482 | if native: |
| 509 | fm = fixme['native'] | 483 | fm = fixme['native'] |
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py index f59eaf7b85..8c567be0f4 100644 --- a/meta/lib/oe/package_manager.py +++ b/meta/lib/oe/package_manager.py | |||
| @@ -507,37 +507,8 @@ def create_packages_dir(d, rpm_repo_dir, deploydir, taskname, filterbydependenci | |||
| 507 | 507 | ||
| 508 | for dep in rpmdeps: | 508 | for dep in rpmdeps: |
| 509 | c = taskdepdata[dep][0] | 509 | c = taskdepdata[dep][0] |
| 510 | 510 | manifest, d2 = oe.sstatesig.find_sstate_manifest(c, taskdepdata[dep][2], taskname, d, multilibs) | |
| 511 | d2 = d | ||
| 512 | variant = '' | ||
| 513 | if taskdepdata[dep][2].startswith("virtual:multilib"): | ||
| 514 | variant = taskdepdata[dep][2].split(":")[2] | ||
| 515 | if variant not in multilibs: | ||
| 516 | multilibs[variant] = oe.utils.get_multilib_datastore(variant, d) | ||
| 517 | d2 = multilibs[variant] | ||
| 518 | |||
| 519 | if c.endswith("-native"): | ||
| 520 | pkgarchs = ["${BUILD_ARCH}"] | ||
| 521 | elif c.startswith("nativesdk-"): | ||
| 522 | pkgarchs = ["${SDK_ARCH}_${SDK_OS}", "allarch"] | ||
| 523 | elif "-cross-canadian" in c: | ||
| 524 | pkgarchs = ["${SDK_ARCH}_${SDK_ARCH}-${SDKPKGSUFFIX}"] | ||
| 525 | elif "-cross-" in c: | ||
| 526 | pkgarchs = ["${BUILD_ARCH}_${TARGET_ARCH}"] | ||
| 527 | elif "-crosssdk" in c: | ||
| 528 | pkgarchs = ["${BUILD_ARCH}_${SDK_ARCH}_${SDK_OS}"] | ||
| 529 | else: | ||
| 530 | pkgarchs = ['${MACHINE_ARCH}'] | ||
| 531 | pkgarchs = pkgarchs + list(reversed(d2.getVar("PACKAGE_EXTRA_ARCHS").split())) | ||
| 532 | pkgarchs.append('allarch') | ||
| 533 | pkgarchs.append('${SDK_ARCH}_${SDK_ARCH}-${SDKPKGSUFFIX}') | ||
| 534 | |||
| 535 | for pkgarch in pkgarchs: | ||
| 536 | manifest = d2.expand("${SSTATE_MANIFESTS}/manifest-%s-%s.%s" % (pkgarch, c, taskname)) | ||
| 537 | if os.path.exists(manifest): | ||
| 538 | break | ||
| 539 | if not os.path.exists(manifest): | 511 | if not os.path.exists(manifest): |
| 540 | bb.warn("Manifest %s not found in %s (variant '%s')?" % (manifest, d2.expand(" ".join(pkgarchs)), variant)) | ||
| 541 | continue | 512 | continue |
| 542 | with open(manifest, "r") as f: | 513 | with open(manifest, "r") as f: |
| 543 | for l in f: | 514 | for l in f: |
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py index 3a8778eae0..49afed6105 100644 --- a/meta/lib/oe/sstatesig.py +++ b/meta/lib/oe/sstatesig.py | |||
| @@ -1,4 +1,5 @@ | |||
| 1 | import bb.siggen | 1 | import bb.siggen |
| 2 | import oe | ||
| 2 | 3 | ||
| 3 | def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCache): | 4 | def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCache): |
| 4 | # Return True if we should keep the dependency, False to drop it | 5 | # Return True if we should keep the dependency, False to drop it |
| @@ -368,3 +369,37 @@ def sstate_get_manifest_filename(task, d): | |||
| 368 | if extrainf: | 369 | if extrainf: |
| 369 | d2.setVar("SSTATE_MANMACH", extrainf) | 370 | d2.setVar("SSTATE_MANMACH", extrainf) |
| 370 | return (d2.expand("${SSTATE_MANFILEPREFIX}.%s" % task), d2) | 371 | return (d2.expand("${SSTATE_MANFILEPREFIX}.%s" % task), d2) |
| 372 | |||
| 373 | def find_sstate_manifest(taskdata, taskdata2, taskname, d, multilibcache): | ||
| 374 | d2 = d | ||
| 375 | variant = '' | ||
| 376 | if taskdata2.startswith("virtual:multilib"): | ||
| 377 | variant = taskdata2.split(":")[2] | ||
| 378 | if variant not in multilibcache: | ||
| 379 | multilibcache[variant] = oe.utils.get_multilib_datastore(variant, d) | ||
| 380 | d2 = multilibcache[variant] | ||
| 381 | |||
| 382 | if taskdata.endswith("-native"): | ||
| 383 | pkgarchs = ["${BUILD_ARCH}"] | ||
| 384 | elif taskdata.startswith("nativesdk-"): | ||
| 385 | pkgarchs = ["${SDK_ARCH}_${SDK_OS}", "allarch"] | ||
| 386 | elif "-cross-canadian" in taskdata: | ||
| 387 | pkgarchs = ["${SDK_ARCH}_${SDK_ARCH}-${SDKPKGSUFFIX}"] | ||
| 388 | elif "-cross-" in taskdata: | ||
| 389 | pkgarchs = ["${BUILD_ARCH}_${TARGET_ARCH}"] | ||
| 390 | elif "-crosssdk" in taskdata: | ||
| 391 | pkgarchs = ["${BUILD_ARCH}_${SDK_ARCH}_${SDK_OS}"] | ||
| 392 | else: | ||
| 393 | pkgarchs = ['${MACHINE_ARCH}'] | ||
| 394 | pkgarchs = pkgarchs + list(reversed(d2.getVar("PACKAGE_EXTRA_ARCHS").split())) | ||
| 395 | pkgarchs.append('allarch') | ||
| 396 | pkgarchs.append('${SDK_ARCH}_${SDK_ARCH}-${SDKPKGSUFFIX}') | ||
| 397 | |||
| 398 | for pkgarch in pkgarchs: | ||
| 399 | manifest = d2.expand("${SSTATE_MANIFESTS}/manifest-%s-%s.%s" % (pkgarch, taskdata, taskname)) | ||
| 400 | if os.path.exists(manifest): | ||
| 401 | return manifest, d2 | ||
| 402 | bb.warn("Manifest %s not found in %s (variant '%s')?" % (manifest, d2.expand(" ".join(pkgarchs)), variant)) | ||
| 403 | return None, d2 | ||
| 404 | |||
| 405 | |||
