Merge "Software show change related to Patched ISO"

This commit is contained in:
Zuul 2024-09-03 15:15:35 +00:00 committed by Gerrit Code Review
commit 28b8fcb36f
3 changed files with 13 additions and 0 deletions

View File

@ -10,6 +10,7 @@
<status>REL</status>
<unremovable>Y</unremovable>
<reboot_required>Y</reboot_required>
<prepatched_iso>N</prepatched_iso>
<apply_active_release_only/>
<contents>
<ostree>

View File

@ -158,6 +158,10 @@ class SWRelease(object):
def reboot_required(self):
return self._get_by_key('reboot_required') == "Y"
@property
def prepatched_iso(self):
return self._get_by_key('prepatched_iso') == "Y"
@property
def requires_release_ids(self):
return self._get_by_key('requires') or []
@ -255,6 +259,7 @@ class SWRelease(object):
"install_instructions": self.install_instructions,
"warnings": self.warnings,
"reboot_required": self.reboot_required,
"prepatched_iso": self.prepatched_iso,
"requires": self.requires_release_ids[:],
"packages": self.packages[:]}
return data

View File

@ -365,6 +365,13 @@ class ReleaseData(object):
else:
self.metadata[release_id]["reboot_required"] = "N"
# Default prepatched_iso to N
prepatched_iso = root.findtext("prepatched_iso")
if prepatched_iso is None or prepatched_iso != "Y":
self.metadata[release_id]["prepatched_iso"] = "N"
else:
self.metadata[release_id]["prepatched_iso"] = "Y"
release_sw_version = utils.get_major_release_version(
self.metadata[release_id]["sw_version"])
global package_dir