Skip to content

SPDX: use 'AND' instead of '&' - #327

Merged
robwoolley merged 1 commit into
ros-infrastructure:masterfrom
vermaete:master
Sep 1, 2026
Merged

SPDX: use 'AND' instead of '&'#327
robwoolley merged 1 commit into
ros-infrastructure:masterfrom
vermaete:master

Conversation

@vermaete

Copy link
Copy Markdown
Contributor

The SPDX specification no longer accepts '&' as a license operator. Replace it with 'AND' to comply with the SPDX rules used by Yocto.

@robwoolley I have tested it with a local script. Not with the 'Actions' of Github. But we do need it at master. Could you redo the latest sync of master/rolling so I can verify it and finish the recipes in meta-ros2 and meta-ros-common?

robwoolley pushed a commit to vermaete/meta-ros that referenced this pull request Aug 2, 2026
Convert the LICENSE string to the new Yocto rules.

Done with `openembedded-core/scripts/contrib/convert-spdx-licenses.py`

@see: ros-infrastructure/superflore#327

Signed-off-by: Jan Vermaete <jan.vermaete@gmail.com>
Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
@robwoolley

Copy link
Copy Markdown
Contributor

Thanks @vermaete. I can't merge this as it is as it would break support for Scarthgap and Wrynose. There is already an example of making changes based on the target Yocto release.

See here for details: https://github.com/ros-infrastructure/superflore/blob/master/superflore/generators/bitbake/yocto_recipe.py#L513

Would it be possible to rework this PR to make it only applicable to Blacksail and later releases?

@vermaete

vermaete commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

@robwoolley I have added the check on the Yocto version.

@vermaete
vermaete marked this pull request as ready for review August 6, 2026 05:44
@robwoolley

robwoolley commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

What do you think of adding the whitespace to _concat (eg. " AND " and " & ") to avoid having to use the formatted string?

eg.
oe_lic = f' {_concat} '.join([get_license(lic) for lic in self.license])

becomes:
oe_lic = _concat.join([get_license(lic) for lic in self.license])

@robwoolley

Copy link
Copy Markdown
Contributor

This change looks correct but failed in testing because of how scripts/ros-generate-recipes.sh works. I need to fix the script to validate this fix.

See ros/meta-ros#1814

@robwoolley
robwoolley force-pushed the master branch 2 times, most recently from 90c6c42 to c2a5fab Compare September 1, 2026 14:49
@robwoolley
robwoolley self-requested a review September 1, 2026 14:52

@robwoolley robwoolley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great. Thank you. I have run CI builds to confirm that this is working.

The SPDX specification no longer accepts '&' as a license
operator. Replace it with 'AND' to comply with the SPDX rules
used by Yocto.

Signed-off-by: Jan Vermaete <jan.vermaete@gmail.com>

@robwoolley robwoolley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PEP8 is finally satisfied with the line lengths.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@robwoolley
robwoolley merged commit eb8524c into ros-infrastructure:master Sep 1, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants