diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-08-16 16:01:06 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-08-17 09:53:04 +0100 |
commit | dd6b55d70c0616e69ecc7366650cd0f7e1678bd8 (patch) | |
tree | d00f23f07f237d833ee7e11df584fa17dd7c41cc /meta/classes | |
parent | 12e1f9815d7f0bf6dbe22e8e9cff6d1bda9241ce (diff) | |
download | poky-dd6b55d70c0616e69ecc7366650cd0f7e1678bd8.tar.gz |
package/scripts: Fix FILES_INFO handling
There is a long standing bug where FILES_INFO isn't written into pkgdata
with a package suffix. This means if the files are read into the datastore
as intended, the last one "wins".
Fix this to work as intended. Most of the call sites using the data need
to be updated to handle this and the overrides change correctly.
Also fix some other problematic references noticed along the way.
(From OE-Core rev: a1190903e0a61a12c9854c96af918ae8d12c6327)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/insane.bbclass | 4 | ||||
-rw-r--r-- | meta/classes/package.bbclass | 2 | ||||
-rw-r--r-- | meta/classes/toaster.bbclass | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 810459d432..b84e6035ed 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass | |||
@@ -808,11 +808,11 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, taskdeps, packages, d): | |||
808 | # For Saving the FILERPROVIDES, RPROVIDES and FILES_INFO | 808 | # For Saving the FILERPROVIDES, RPROVIDES and FILES_INFO |
809 | rdep_data = oe.packagedata.read_subpkgdata(rdep, d) | 809 | rdep_data = oe.packagedata.read_subpkgdata(rdep, d) |
810 | for key in rdep_data: | 810 | for key in rdep_data: |
811 | if key.startswith("FILERPROVIDES_") or key.startswith("RPROVIDES:"): | 811 | if key.startswith("FILERPROVIDES:") or key.startswith("RPROVIDES:"): |
812 | for subkey in bb.utils.explode_deps(rdep_data[key]): | 812 | for subkey in bb.utils.explode_deps(rdep_data[key]): |
813 | filerdepends.pop(subkey,None) | 813 | filerdepends.pop(subkey,None) |
814 | # Add the files list to the rprovides | 814 | # Add the files list to the rprovides |
815 | if key == "FILES_INFO": | 815 | if key.startswith("FILES_INFO:"): |
816 | # Use eval() to make it as a dict | 816 | # Use eval() to make it as a dict |
817 | for subkey in eval(rdep_data[key]): | 817 | for subkey in eval(rdep_data[key]): |
818 | filerdepends.pop(subkey,None) | 818 | filerdepends.pop(subkey,None) |
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index a9138ff6be..fb3c346f69 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
@@ -1652,7 +1652,7 @@ fi | |||
1652 | if fstat.st_ino not in seen: | 1652 | if fstat.st_ino not in seen: |
1653 | seen.add(fstat.st_ino) | 1653 | seen.add(fstat.st_ino) |
1654 | total_size += fstat.st_size | 1654 | total_size += fstat.st_size |
1655 | d.setVar('FILES_INFO', json.dumps(files, sort_keys=True)) | 1655 | d.setVar('FILES_INFO:' + pkg , json.dumps(files, sort_keys=True)) |
1656 | 1656 | ||
1657 | process_postinst_on_target(pkg, d.getVar("MLPREFIX")) | 1657 | process_postinst_on_target(pkg, d.getVar("MLPREFIX")) |
1658 | add_set_e_to_scriptlets(pkg) | 1658 | add_set_e_to_scriptlets(pkg) |
diff --git a/meta/classes/toaster.bbclass b/meta/classes/toaster.bbclass index 9518ddf7a4..dd5c7f224b 100644 --- a/meta/classes/toaster.bbclass +++ b/meta/classes/toaster.bbclass | |||
@@ -106,7 +106,7 @@ def _toaster_load_pkgdatafile(dirpath, filepath): | |||
106 | pkgdata['OPKGN'] = m.group(1) | 106 | pkgdata['OPKGN'] = m.group(1) |
107 | kn = "_".join([x for x in kn.split("_") if x.isupper()]) | 107 | kn = "_".join([x for x in kn.split("_") if x.isupper()]) |
108 | pkgdata[kn] = kv.strip() | 108 | pkgdata[kn] = kv.strip() |
109 | if kn == 'FILES_INFO': | 109 | if kn.startswith('FILES_INFO'): |
110 | pkgdata[kn] = json.loads(kv) | 110 | pkgdata[kn] = json.loads(kv) |
111 | 111 | ||
112 | except ValueError: | 112 | except ValueError: |