Skip to content

Commit

Permalink
envsetup: Resolve symlinks before bind mounting oe dirs into container
Browse files Browse the repository at this point in the history
Sometimes, user may create a symlink into usual TMPDIR which may span
across a mount point on host, this helps in deducing that, and passing
right directories to be bind mounted for tmp/sstate-cache/downloads

Signed-off-by: Khem Raj <[email protected]>
  • Loading branch information
kraj committed Jan 29, 2020
1 parent 0b17295 commit 5b129a4
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions envsetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -479,15 +479,9 @@ dkr() {
unset MAP_DL_DIR
unset MAP_TMPDIR
unset MAP_SSTATE_DIR
if [ -n "$CUSTOM_DL_DIR" ]; then
MAP_DL_DIR="-v $CUSTOM_DL_DIR:$CUSTOM_DL_DIR"
fi
if [ -n "$CUSTOM_TMPDIR" ]; then
MAP_TMPDIR="-v $CUSTOM_TMPDIR:$CUSTOM_TMPDIR"
fi
if [ -n "$CUSTOM_SSTATE_DIR" ]; then
MAP_SSTATE_DIR="-v $CUSTOM_SSTATE_DIR:$CUSTOM_SSTATE_DIR"
fi
MAP_TMPDIR="-v $(readlink -f $OE_BUILD_TMPDIR):$(readlink -f $OE_BUILD_TMPDIR)"
MAP_DL_DIR="-v $(readlink -f $OE_DL_DIR):$(readlink -f $OE_DL_DIR)"
MAP_SSTATE_DIR="-v $(readlink -f $OE_SSTATE_DIR):$(readlink -f $OE_SSTATE_DIR)"

if [ -n "$SSH_AUTH_SOCK" ]; then
SSH_AUTH_DIR=$(readlink -f $SSH_AUTH_SOCK)
Expand Down

0 comments on commit 5b129a4

Please sign in to comment.