Skip to content

Commit 0e29736

Browse files
easybeb-rowan
authored andcommitted
Fix RAUC bundle compatible string parsing
E.g. raspberrypi4 should be parsed as `hw_model` without a revision.
1 parent 9f0867b commit 0e29736

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

goosebit/updates/swdesc/rauc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def parse_descriptor(manifest: configparser.ConfigParser) -> dict[str, Any]:
3535
swdesc_attrs = {}
3636
try:
3737
swdesc_attrs["version"] = semver.Version.parse(manifest["update"].get("version"))
38-
pattern = re.compile(r"^(?P<hw_model>.+?)[- ]?(?P<hw_revision>\w*[\d.]+\w*)?$")
38+
pattern = re.compile(r"^(?P<hw_model>.+?)([- ](?P<hw_revision>\w*[\d.]+\w*))?$")
3939
hw_model = "default"
4040
hw_revision = "default"
4141
m = pattern.match(manifest["update"]["compatible"])

0 commit comments

Comments
 (0)