Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: remove IB leftover on cleanup #379

Merged
merged 1 commit into from
Aug 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions asu/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ def report_error(msg):
target, subtarget = req["target"].split("/")
cache = req.get("cache_path", Path.cwd()) / "cache" / req["version"]
cache_workdir = cache / target / subtarget
sums_file = Path(cache / target / f"{subtarget}_sums")
sig_file = Path(cache / target / f"{subtarget}_sums.sig")
sums_file = Path(cache / target / f"{subtarget}.sha256sums")
sig_file = Path(cache / target / f"{subtarget}.sha256sums.sig")

def setup_ib():
"""Setup ImageBuilder based on `req`
Expand Down Expand Up @@ -158,7 +158,7 @@ def download_file(filename: str, dest: str = None):

(cache / target).mkdir(parents=True, exist_ok=True)

stamp_file = cache / target / f"{subtarget}_stamp"
stamp_file = cache / target / f"{subtarget}.stamp"

sig_file_headers = requests.head(
req["upstream_url"]
Expand Down Expand Up @@ -399,6 +399,9 @@ def download_file(filename: str, dest: str = None):
)
if (cache / target_subtarget).exists():
rmtree(cache / target_subtarget)
_, subtarget = target_subtarget.split("/")
for suffix in [".stamp", ".sha256sums", ".sha256sums.sig"]:
(cache / subtarget).with_suffix(suffix).unlink()
else:
log.debug("Keeping ImageBuilder for %s", target_subtarget)

Expand Down