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 | |
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>
-rw-r--r-- | meta/classes/sanity.bbclass | 23 | ||||
-rw-r--r-- | meta/conf/abi_version.conf | 2 |
2 files changed, 23 insertions, 2 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)) |
diff --git a/meta/conf/abi_version.conf b/meta/conf/abi_version.conf index 66df69bb8d..2a08b1208b 100644 --- a/meta/conf/abi_version.conf +++ b/meta/conf/abi_version.conf | |||
@@ -4,7 +4,7 @@ | |||
4 | # that breaks the format and have been previously discussed on the mailing list | 4 | # that breaks the format and have been previously discussed on the mailing list |
5 | # with general agreement from the core team. | 5 | # with general agreement from the core team. |
6 | # | 6 | # |
7 | OELAYOUT_ABI = "14" | 7 | OELAYOUT_ABI = "15" |
8 | 8 | ||
9 | # | 9 | # |
10 | # HASHEQUIV_HASH_VERSION is injected into the output hash calculation used by | 10 | # HASHEQUIV_HASH_VERSION is injected into the output hash calculation used by |