summaryrefslogtreecommitdiffstats
path: root/scripts/lib/recipetool/append.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-08-16 16:01:06 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-08-17 09:53:04 +0100
commitdd6b55d70c0616e69ecc7366650cd0f7e1678bd8 (patch)
treed00f23f07f237d833ee7e11df584fa17dd7c41cc /scripts/lib/recipetool/append.py
parent12e1f9815d7f0bf6dbe22e8e9cff6d1bda9241ce (diff)
downloadpoky-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 'scripts/lib/recipetool/append.py')
-rw-r--r--scripts/lib/recipetool/append.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/lib/recipetool/append.py b/scripts/lib/recipetool/append.py
index 5f629c07d8..88ed8c5f01 100644
--- a/scripts/lib/recipetool/append.py
+++ b/scripts/lib/recipetool/append.py
@@ -72,15 +72,15 @@ def find_target_file(targetpath, d, pkglist=None):
72 # This does assume that PN comes before other values, but that's a fairly safe assumption 72 # This does assume that PN comes before other values, but that's a fairly safe assumption
73 for line in f: 73 for line in f:
74 if line.startswith('PN:'): 74 if line.startswith('PN:'):
75 pn = line.split(':', 1)[1].strip() 75 pn = line.split(': ', 1)[1].strip()
76 elif line.startswith('FILES_INFO:'): 76 elif line.startswith('FILES_INFO'):
77 val = line.split(':', 1)[1].strip() 77 val = line.split(': ', 1)[1].strip()
78 dictval = json.loads(val) 78 dictval = json.loads(val)
79 for fullpth in dictval.keys(): 79 for fullpth in dictval.keys():
80 if fnmatch.fnmatchcase(fullpth, targetpath): 80 if fnmatch.fnmatchcase(fullpth, targetpath):
81 recipes[targetpath].append(pn) 81 recipes[targetpath].append(pn)
82 elif line.startswith('pkg_preinst:') or line.startswith('pkg_postinst:'): 82 elif line.startswith('pkg_preinst:') or line.startswith('pkg_postinst:'):
83 scriptval = line.split(':', 1)[1].strip().encode('utf-8').decode('unicode_escape') 83 scriptval = line.split(': ', 1)[1].strip().encode('utf-8').decode('unicode_escape')
84 if 'update-alternatives --install %s ' % targetpath in scriptval: 84 if 'update-alternatives --install %s ' % targetpath in scriptval:
85 recipes[targetpath].append('?%s' % pn) 85 recipes[targetpath].append('?%s' % pn)
86 elif targetpath_re.search(scriptval): 86 elif targetpath_re.search(scriptval):