thought-machine / pleasings

Addons & new build rules for Please
Apache License 2.0
98 stars 39 forks source link

OCI: Fix the context directory #69

Closed andrew-womeldorf closed 3 years ago

andrew-womeldorf commented 3 years ago

$TMPDIR is not a variable in this script. It was used while creating $STORE, but was ephemeral, so it's an empty string when used where this change was made. Changing the context dir to be in the $STORE.

before

STORE=$(TMPDIR=/tmp mktemp -d) \
&& TOOL="$TOOL --root=$STORE/containers --runroot=$STORE/run" \
&& mkdir "$TMPDIR/context" \                                <--- evaluated to `/context`
&& mv "$SRCS_CONTEXT" "$TMPDIR/context" \
...

after

STORE=$(TMPDIR=/tmp mktemp -d) \
&& TOOL="$TOOL --root=$STORE/containers --runroot=$STORE/run" \
&& mkdir "$STORE/context" \
&& mv "$SRCS_CONTEXT" "$STORE/context" \
...

P.S. I'm very happy this pleasing was added! I'm enjoying using it so far!

Tatskaari commented 3 years ago

Thanks Andrew! Seems sensible to me. Thanks for the PR.