Skip to content

Properly resolve platforms given a cname #154

@nkraetzschmar

Description

@nkraetzschmar

What would you like to be added:

Correctly resolve the platform for a given input cname in src/gardenlinux/features/cname.py#L139 by resolving the cname into the feature set it represents and then filtering this feature set by those marked as platform (see gardenlinux/builder: builder/parse_features#L89 for an example how to correctly resolve platforms given features).

In src/gardenlinux/features/main.py#L157 this is already done correctly, so cname.py just needs to be adjusted to work the same.

Why is this needed:

The current implementation makes the assumption that there is always one - and only one - platform and that this will always be the first component in the cname. While this is going to be correct in the vast majority of cases, there technically is nothing stopping a cname to contain more or less then 1 platform.

Note

This issue is analogous to gardenlinux/gardenlinux#3243 as both appear to be a result of the same misunderstanding of what makes a feature a platform and how cnames are encoded

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions