Fixes ssg/utils.py to parse version numbers#14588
Merged
Mab879 merged 1 commit intoComplianceAsCode:masterfrom Mar 20, 2026
Merged
Fixes ssg/utils.py to parse version numbers#14588Mab879 merged 1 commit intoComplianceAsCode:masterfrom
Mab879 merged 1 commit intoComplianceAsCode:masterfrom
Conversation
Member
Author
Mab879
approved these changes
Mar 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

When we first wrote ssg/utils.py we assumed product names would never contain numbers. So it worked for names like:
rhel9->rhel+9ubuntu2404->ubuntu+2404But it failed for names like
bascontrol22d4because the prefix itself contains digits (22) before the final version digit (4).This patch fixes that and we now can capture the shortest possible prefix then capture the final run of digits at the end of the string.
So now:
bascontrol22d4->bascontrol22d+4That matters because the build system uses this parser to derive product
nameandversionpieces for labels, IDs, and generated content. Without the change, products with numbers in their name break the building system.This patch updates that regex to make product IDs with digits in the middle valid, as long as they still end with a numeric version.