forked from Mirror/pmbootstrap
pmb: Also apply ext4 metadata_csum workaround for archived ports
Ports in the archived category may be downstream ports. While mainline
ports also are allowed, archived ports should generally not be relied on
anyway so the loss of ext4 reliability on those shouldn't matter.
Fixes 89a80265de
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/merge_requests/2640
This commit is contained in:
parent
3c1699b5c1
commit
7b78bcfcf9
2 changed files with 17 additions and 2 deletions
|
@ -51,6 +51,21 @@ class DeviceCategory(Enum):
|
|||
DeviceCategory.DOWNSTREAM,
|
||||
]
|
||||
|
||||
def allows_downstream_ports(self) -> bool:
|
||||
"""Check whether a given category is allowed to contain downstream ports. This does not
|
||||
necessarily mean that it exclusively contains downstream ports.
|
||||
|
||||
:returns: True, if the category allows downstream ports, False if only allows mainline ports.
|
||||
"""
|
||||
|
||||
match self:
|
||||
case DeviceCategory.ARCHIVED | DeviceCategory.DOWNSTREAM:
|
||||
return True
|
||||
case DeviceCategory.TESTING | DeviceCategory.COMMUNITY | DeviceCategory.MAIN:
|
||||
return False
|
||||
case _:
|
||||
raise AssertionError
|
||||
|
||||
def explain(self) -> str:
|
||||
"""Provide an explanation of a given category.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue