GoogleContainerTools / rules_distroless

Apache License 2.0
55 stars 34 forks source link

fix: decompression fails with multiple apt.install calls #72

Closed thesayyn closed 3 months ago

thesayyn commented 3 months ago

This fixes an issue where two calls in the same extension instance fails because bzlmod extensions share working directory per use_extension call.

This works;

apt = use_extension("@rules_distroless//apt:extensions.bzl", "apt")
apt.install(
    name = "bullseye",
    lock = ":bullseye.lock.json",
    manifest = ":bullseye.yaml",
)

apt2 = use_extension("@rules_distroless//apt:extensions.bzl", "apt")
apt2.install(
    name = "bullseye_nolock",
    lock = ":bullseye.lock.json",
    manifest = ":bullseye.yaml",
)

but this fails

apt = use_extension("@rules_distroless//apt:extensions.bzl", "apt")
apt.install(
    name = "bullseye",
    lock = ":bullseye.lock.json",
    manifest = ":bullseye.yaml",
)
apt.install(
    name = "bullseye_nolock",
    # lock = ":bullseye.lock.json",
    manifest = ":bullseye.yaml",
)