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 9e0a3fd
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions rockcraft_lpci_build/rockcraft_lpci_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,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"]
except KeyError:
build_base = self.rockcraft_yaml_raw.get(
"build-base", self.rockcraft_yaml_raw.get("build_base")
)

if not build_base:
logging.info(f"No 'build-base' in the rockfile. Using 'base' instead")
logging.info(self.rockcraft_yaml_raw)
try:
build_base = self.rockcraft_yaml_raw["base"]
except KeyError:
Expand Down Expand Up @@ -459,7 +463,7 @@ def wait_for_lp_builds(self) -> list:
logging.error("%s Continuing", error_msg)
continue

logging.error("%s. Keeping the Launchpad repo alive", error_msg)
logging.error("%s Keeping the Launchpad repo alive", error_msg)
atexit.unregister(self.delete_git_repository)
raise LaunchpadBuildFailure()
else:
Expand Down

0 comments on commit 9e0a3fd

Please sign in to comment.