diff options
| author | Alexander Kanavin <alex.kanavin@gmail.com> | 2022-02-26 16:02:17 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-03-02 18:43:24 +0000 |
| commit | ab02b96e6506a7806917349def8a300ce51bae5d (patch) | |
| tree | 9a0395797ac6d2ae4235f38c383f2e4562aa380a /meta/classes/sanity.bbclass | |
| parent | c486c6609a77d50a60f582ce53b592a717ec9b16 (diff) | |
| download | poky-ab02b96e6506a7806917349def8a300ce51bae5d.tar.gz | |
OELAYOUT_ABI: bump, avoid tmp/ breakage by removing old cross manifests
(From OE-Core rev: c0fca53a9b48cb4e92da89e9e652623296244ff6)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sanity.bbclass')
| -rw-r--r-- | meta/classes/sanity.bbclass | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index 773902e619..92807dc88e 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass | |||
| @@ -559,6 +559,24 @@ def sanity_check_conffiles(d): | |||
| 559 | bb.fatal(str(e)) | 559 | bb.fatal(str(e)) |
| 560 | d.setVar("BB_INVALIDCONF", True) | 560 | d.setVar("BB_INVALIDCONF", True) |
| 561 | 561 | ||
| 562 | def drop_v14_cross_builds(d): | ||
| 563 | import glob | ||
| 564 | indexes = glob.glob(d.expand("${SSTATE_MANIFESTS}/index-${BUILD_ARCH}_*")) | ||
| 565 | for i in indexes: | ||
| 566 | with open(i, "r") as f: | ||
| 567 | lines = f.readlines() | ||
| 568 | for l in reversed(lines): | ||
| 569 | try: | ||
| 570 | (stamp, manifest, workdir) = l.split() | ||
| 571 | except ValueError: | ||
| 572 | bb.fatal("Invalid line '%s' in sstate manifest '%s'" % (l, i)) | ||
| 573 | for m in glob.glob(manifest + ".*"): | ||
| 574 | if m.endswith(".postrm"): | ||
| 575 | continue | ||
| 576 | sstate_clean_manifest(m, d) | ||
| 577 | bb.utils.remove(stamp + "*") | ||
| 578 | bb.utils.remove(workdir, recurse = True) | ||
| 579 | |||
| 562 | def sanity_handle_abichanges(status, d): | 580 | def sanity_handle_abichanges(status, d): |
| 563 | # | 581 | # |
| 564 | # Check the 'ABI' of TMPDIR | 582 | # Check the 'ABI' of TMPDIR |
| @@ -577,7 +595,10 @@ def sanity_handle_abichanges(status, d): | |||
| 577 | status.addresult("The layout of TMPDIR changed for Recipe Specific Sysroots.\nConversion doesn't make sense and this change will rebuild everything so please delete TMPDIR (%s).\n" % d.getVar("TMPDIR")) | 595 | status.addresult("The layout of TMPDIR changed for Recipe Specific Sysroots.\nConversion doesn't make sense and this change will rebuild everything so please delete TMPDIR (%s).\n" % d.getVar("TMPDIR")) |
| 578 | elif int(abi) <= 13 and current_abi == "14": | 596 | elif int(abi) <= 13 and current_abi == "14": |
| 579 | status.addresult("TMPDIR changed to include path filtering from the pseudo database.\nIt is recommended to use a clean TMPDIR with the new pseudo path filtering so TMPDIR (%s) would need to be removed to continue.\n" % d.getVar("TMPDIR")) | 597 | status.addresult("TMPDIR changed to include path filtering from the pseudo database.\nIt is recommended to use a clean TMPDIR with the new pseudo path filtering so TMPDIR (%s) would need to be removed to continue.\n" % d.getVar("TMPDIR")) |
| 580 | 598 | elif int(abi) == 14 and current_abi == "15": | |
| 599 | drop_v14_cross_builds(d) | ||
| 600 | with open(abifile, "w") as f: | ||
| 601 | f.write(current_abi) | ||
| 581 | elif (abi != current_abi): | 602 | elif (abi != current_abi): |
| 582 | # Code to convert from one ABI to another could go here if possible. | 603 | # Code to convert from one ABI to another could go here if possible. |
| 583 | status.addresult("Error, TMPDIR has changed its layout version number (%s to %s) and you need to either rebuild, revert or adjust it at your own risk.\n" % (abi, current_abi)) | 604 | status.addresult("Error, TMPDIR has changed its layout version number (%s to %s) and you need to either rebuild, revert or adjust it at your own risk.\n" % (abi, current_abi)) |
