Skip to content

Commit 1ad97b9

Browse files
committed
fix(rockcraft_lpci_build): both build-base and build_base are allowed
1 parent fb43333 commit 1ad97b9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

rockcraft_lpci_build/rockcraft_lpci_build.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,13 @@ def get_rock_archs(self) -> list:
314314

315315
def get_rock_build_base(self) -> str:
316316
"""Infer the Ubuntu series for lpci, from the rockcraft.yaml file"""
317-
try:
318-
build_base = self.rockcraft_yaml_raw["build_base"]
319-
except KeyError:
317+
build_base = self.rockcraft_yaml_raw.get(
318+
"build-base", self.rockcraft_yaml_raw.get("build_base")
319+
)
320+
321+
if not build_base:
322+
logging.info(f"No 'build-base' in the rockfile. Using 'base' instead")
323+
logging.info(self.rockcraft_yaml_raw)
320324
try:
321325
build_base = self.rockcraft_yaml_raw["base"]
322326
except KeyError:

0 commit comments

Comments
 (0)