@@ -51,7 +51,7 @@ def __init__(self, cname, arch=None, commit_hash=None, version=None):
5151 self ._commit_id = None
5252 self ._feature_elements_cached = None
5353 self ._feature_flags_cached = None
54- self ._feature_platform_cached = None
54+ self ._feature_platforms_cached = None
5555 self ._feature_set_cached = None
5656 self ._platform_variant_cached = None
5757
@@ -239,10 +239,10 @@ def feature_set_platform(self) -> str:
239239 :since: 1.0.0
240240 """
241241
242- if self ._feature_platform_cached is not None :
243- return self ._feature_platform_cached
244-
245- platforms = Parser (). filter_as_dict ( self .flavor )[ "platform" ]
242+ if self ._feature_platforms_cached is None :
243+ platforms = Parser (). filter_as_dict ( self .flavor )[ "platform" ]
244+ else :
245+ platforms = self ._feature_platforms_cached
246246
247247 if self ._flag_multiple_platforms :
248248 return "," .join (platforms )
@@ -260,7 +260,15 @@ def platform(self) -> str:
260260 :since: 0.7.0
261261 """
262262
263- return self .feature_set_platform
263+ if self ._feature_platforms_cached is None :
264+ platforms = Parser ().filter_as_dict (self .flavor )["platform" ]
265+ else :
266+ platforms = self ._feature_platforms_cached
267+
268+ if not self ._flag_multiple_platforms :
269+ assert len (platforms ) < 2
270+
271+ return platforms [0 ]
264272
265273 @property
266274 def platform_variant (self ) -> Optional [str ]:
@@ -306,8 +314,9 @@ def release_metadata_string(self) -> str:
306314
307315 elements = "," .join (features ["element" ])
308316 flags = "," .join (features ["flag" ])
309- platform = "," . join ( features ["platform" ])
317+ platform = features ["platform" ][ 0 ]
310318 platform_variant = self .platform_variant
319+ platforms = "," .join (features ["platform" ])
311320
312321 if platform_variant is None :
313322 platform_variant = ""
@@ -323,9 +332,10 @@ def release_metadata_string(self) -> str:
323332BUG_REPORT_URL="{ GL_BUG_REPORT_URL } "
324333GARDENLINUX_CNAME="{ self .cname } "
325334GARDENLINUX_FEATURES="{ self .feature_set } "
326- GARDENLINUX_FEATURES_PLATFORM ="{ platform } "
335+ GARDENLINUX_FEATURES_PLATFORMS ="{ platforms } "
327336GARDENLINUX_FEATURES_ELEMENTS="{ elements } "
328337GARDENLINUX_FEATURES_FLAGS="{ flags } "
338+ GARDENLINUX_PLATFORM="{ platform } "
329339GARDENLINUX_PLATFORM_VARIANT="{ platform_variant } "
330340GARDENLINUX_VERSION="{ self .version } "
331341GARDENLINUX_COMMIT_ID="{ self .commit_id } "
@@ -384,7 +394,7 @@ def load_from_release_file(self, release_file: PathLike | str) -> None:
384394 "GARDENLINUX_FEATURES" ,
385395 "GARDENLINUX_FEATURES_ELEMENTS" ,
386396 "GARDENLINUX_FEATURES_FLAGS" ,
387- "GARDENLINUX_FEATURES_PLATFORM " ,
397+ "GARDENLINUX_FEATURES_PLATFORMS " ,
388398 "GARDENLINUX_VERSION" ,
389399 ):
390400 if not release_config .has_option (UNNAMED_SECTION , release_field ):
@@ -439,9 +449,11 @@ def load_from_release_file(self, release_file: PathLike | str) -> None:
439449 .split ("," )
440450 )
441451
442- self ._feature_platform_cached = release_config .get (
443- UNNAMED_SECTION , "GARDENLINUX_FEATURES_PLATFORM"
444- ).strip ("\" '" )
452+ self ._feature_platforms_cached = (
453+ release_config .get (UNNAMED_SECTION , "GARDENLINUX_FEATURES_PLATFORMS" )
454+ .strip ("\" '" )
455+ .split ("," )
456+ )
445457
446458 if release_config .has_option (UNNAMED_SECTION , "GARDENLINUX_PLATFORM_VARIANT" ):
447459 self ._platform_variant_cached = release_config .get (
0 commit comments