@@ -229,9 +229,20 @@ for pypkg in old_manifest:
# will RDEPEND on it
for pypkg in old_manifest:
+ # Handle special cases, we assume that when they were manually added
+ # to the manifest we knew what we were doing.
+ special_packages = ['misc', 'modules', 'dev', 'tests']
+ if pypkg in special_packages or 'staticdev' in pypkg:
+ print_indent('Passing %s package directly' % pypkg, 2)
+ new_manifest[pypkg] = old_manifest[pypkg]
+ if 'rprovides' not in new_manifest[pypkg]:
+ new_manifest[pypkg]['rprovides'] = []
+ continue
+
# Use an empty dict as data structure to hold data for each package and fill it up
new_manifest[pypkg] = {}
new_manifest[pypkg]['summary'] = old_manifest[pypkg]['summary']
+ new_manifest[pypkg]['rprovides'] = old_manifest[pypkg].get('rprovides', [])
new_manifest[pypkg]['rdepends'] = []
if "skip_depends" in old_manifest[pypkg]:
new_manifest[pypkg]['skip_depends'] = old_manifest[pypkg]['skip_depends']
@@ -248,14 +259,6 @@ for pypkg in old_manifest:
print('Handling package %s' % pypkg)
print('--------------------------')
- # Handle special cases, we assume that when they were manually added
- # to the manifest we knew what we were doing.
- special_packages = ['misc', 'modules', 'dev', 'tests']
- if pypkg in special_packages or 'staticdev' in pypkg:
- print_indent('Passing %s package directly' % pypkg, 2)
- new_manifest[pypkg] = old_manifest[pypkg]
- continue
-
for filedep in old_manifest[pypkg]['files']:
# We already handled core on the first pass, we can ignore it now
if pypkg == 'core':
@@ -440,6 +443,10 @@ for pypkg in new_manifest:
new_manifest[pypkg]['files'].sort()
new_manifest[pypkg]['cached'].sort()
new_manifest[pypkg]['rdepends'].sort()
+ new_manifest[pypkg]['rprovides'].sort()
+ # Remove empty sections
+ if not new_manifest[pypkg]['rprovides']:
+ new_manifest[pypkg].pop('rprovides')
# Create the manifest from the data structure that was built
with open('python3-manifest.json.new','w') as outfile:
@@ -441,6 +441,10 @@ python(){
pypackage = pn + '-' + key + '-native'
if pypackage not in rprovides:
rprovides.append(pypackage)
+ for subkey in python_manifest[key].get('rprovides', ()):
+ pypackage = pn + '-' + subkey + '-native'
+ if pypackage not in rprovides:
+ rprovides.append(pypackage)
d.setVar('RPROVIDES:class-native', ' '.join(rprovides))
@@ -474,6 +478,11 @@ python(){
value=value.split('-', 1)[1]
d.appendVar('RDEPENDS:' + pypackage, ' ' + pn + '-' + value)
+ for value in python_manifest[key].get('rprovides', ()):
+ if '${PN}' in value:
+ value=value.split('-', 1)[1]
+ d.appendVar('RPROVIDES:' + pypackage, ' ' + pn + '-' + value)
+
for value in python_manifest[key].get('rrecommends', ()):
if '${PN}' in value:
value=value.split('-', 1)[1]
Allow modules to have a 'rprovides' key, that sets RPROVIDES for the generated package. Signed-off-by: Ross Burton <ross.burton@arm.com> --- .../python/python3/create_manifest3.py | 23 ++++++++++++------- .../python/python3_3.14.10.bb | 9 ++++++++ 2 files changed, 24 insertions(+), 8 deletions(-)