Skip to content

Commit

Permalink
kas-container: forward SSTATE_MIRRORS env var
Browse files Browse the repository at this point in the history
This variable is forwarded 1:1 into the container. In case it contains
a local path (starting with file:///), we issue a warning that this
path manually needs to be made available inside the container.

Signed-off-by: Felix Moessbauer <[email protected]>
Signed-off-by: Jan Kiszka <[email protected]>
  • Loading branch information
fmoessbauer authored and jan-kiszka committed Aug 31, 2023
1 parent 3dd1722 commit 4edb347
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions kas-container
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,14 @@ if [ -n "${SSTATE_DIR}" ]; then
-v "$(readlink -fv "${SSTATE_DIR}")":/sstate:rw \
-e SSTATE_DIR=/sstate
fi
if [ -n "${SSTATE_MIRRORS}" ]; then
if echo "${SSTATE_MIRRORS}" | grep -q "file:///"; then
echo "Warning: SSTATE_MIRRORS contains a local path." \
"Make sure to make this path available inside the container." \
>&2
fi
set -- "$@" -e "SSTATE_MIRRORS=${SSTATE_MIRRORS}"
fi

if [ -n "${KAS_REPO_REF_DIR}" ]; then
if [ ! -d "${KAS_REPO_REF_DIR}" ]; then
Expand Down

0 comments on commit 4edb347

Please sign in to comment.