mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-07 13:06:59 +02:00
enter_chroot: handle /var/lock->/run/lock symlinks
Newer Gentoo builds have moved to /run which means /var/lock is a symlink to /run/lock. But since that is an absolute symlink, it points outside of the chroot which doesn't work for us. Use a stable path unrelated to the chroot instead, but only with newer chroots. We no longer have to worry about backwards compat because the code that used to rely on this lock file (running sync processes) was punted a long time ago. BUG=chromium:218085 TEST=`cbuildbot chromiumos-sdk` passes Change-Id: I38c6848dfb86386849050d7ccf3f90cbbe8e0e81 Reviewed-on: https://gerrit.chromium.org/gerrit/46231 Reviewed-by: David James <davidjames@chromium.org> Commit-Queue: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org>
This commit is contained in:
parent
b957c775ea
commit
0c0fea7b4d
@ -91,9 +91,9 @@ INNER_CHROME_ROOT=$FLAGS_chrome_root_mount # inside chroot
|
||||
CHROME_ROOT_CONFIG="/var/cache/chrome_root" # inside chroot
|
||||
FUSE_DEVICE="/dev/fuse"
|
||||
|
||||
chmod 0777 "$FLAGS_chroot/var/lock"
|
||||
|
||||
LOCKFILE="$FLAGS_chroot/var/lock/enter_chroot"
|
||||
# We can't use /var/lock because that might be a symlink to /run/lock outside
|
||||
# of the chroot. Or /run on the host system might not exist.
|
||||
LOCKFILE="${FLAGS_chroot}/.enter_chroot.lock"
|
||||
MOUNTED_PATH=$(readlink -f "$FLAGS_chroot")
|
||||
|
||||
# Reset the depot tools/internal trunk pathways to what they'll
|
||||
|
Loading…
Reference in New Issue
Block a user