Skip to content

Commit

Permalink
fix(rockcraft_lpci_build): both build-base and build_base are allowed
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdcordeiro committed Apr 9, 2024
1 parent fb43333 commit a3d321a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rockcraft_lpci_build/rockcraft_lpci_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,13 @@ def get_rock_archs(self) -> list:
def get_rock_build_base(self) -> str:
"""Infer the Ubuntu series for lpci, from the rockcraft.yaml file"""
try:
build_base = self.rockcraft_yaml_raw["build_base"]
build_base = self.rockcraft_yaml_raw.get(
"build-base", self.rockcraft_yaml_raw["build_base"]
)
except KeyError:
try:
logging.info(f"No 'build-base' in the rockfile. Using 'base' instead")
logging.info(self.rockcraft_yaml_raw)
build_base = self.rockcraft_yaml_raw["base"]
except KeyError:
logging.exception("%s is missing the 'base' field", self.rockcraft_yaml)
Expand Down

0 comments on commit a3d321a

Please sign in to comment.