Merge pull request #1692 from mwhudson/ignore-bad-systems
log and ignore systems (in the snapd sense) we cannot install
This commit is contained in:
commit
e2bc77b706
|
@ -261,6 +261,19 @@ class FilesystemController(SubiquityController, FilesystemManipulator):
|
||||||
return system
|
return system
|
||||||
|
|
||||||
def info_for_system(self, name: str, label: str, system: SystemDetails):
|
def info_for_system(self, name: str, label: str, system: SystemDetails):
|
||||||
|
if len(system.volumes) > 1:
|
||||||
|
log.error(
|
||||||
|
"Skipping uninstallable system: %s",
|
||||||
|
system_multiple_volumes_text)
|
||||||
|
return None
|
||||||
|
|
||||||
|
[volume] = system.volumes.values()
|
||||||
|
if volume.schema != 'gpt':
|
||||||
|
log.error(
|
||||||
|
"Skipping uninstallable system: %s",
|
||||||
|
system_non_gpt_text)
|
||||||
|
return None
|
||||||
|
|
||||||
info = VariationInfo(
|
info = VariationInfo(
|
||||||
name=name,
|
name=name,
|
||||||
label=label,
|
label=label,
|
||||||
|
@ -268,15 +281,6 @@ class FilesystemController(SubiquityController, FilesystemManipulator):
|
||||||
system=system,
|
system=system,
|
||||||
)
|
)
|
||||||
|
|
||||||
if len(system.volumes) > 1:
|
|
||||||
info.error = system_multiple_volumes_text
|
|
||||||
return info
|
|
||||||
|
|
||||||
[volume] = system.volumes.values()
|
|
||||||
if volume.schema != 'gpt':
|
|
||||||
info.error = system_non_gpt_text
|
|
||||||
return info
|
|
||||||
|
|
||||||
se = system.storage_encryption
|
se = system.storage_encryption
|
||||||
if se.support == StorageEncryptionSupport.DEFECTIVE:
|
if se.support == StorageEncryptionSupport.DEFECTIVE:
|
||||||
info.error = system_defective_encryption_text.format(
|
info.error = system_defective_encryption_text.format(
|
||||||
|
@ -321,8 +325,9 @@ class FilesystemController(SubiquityController, FilesystemManipulator):
|
||||||
system = await self._get_system(name, label)
|
system = await self._get_system(name, label)
|
||||||
log.debug("got system %s for variation %s", system, name)
|
log.debug("got system %s for variation %s", system, name)
|
||||||
if system is not None and len(system.volumes) > 0:
|
if system is not None and len(system.volumes) > 0:
|
||||||
self._variation_info[name] = self.info_for_system(
|
info = self.info_for_system(name, label, system)
|
||||||
name, label, system)
|
if info is not None:
|
||||||
|
self._variation_info[name] = info
|
||||||
else:
|
else:
|
||||||
# This calculation is pretty much a hack and we should
|
# This calculation is pretty much a hack and we should
|
||||||
# actually think about it at some point (like: maybe the
|
# actually think about it at some point (like: maybe the
|
||||||
|
|
Loading…
Reference in New Issue