make_chroot: clear existing make.conf.user
We've been creating this as a self-referential symlink which means
we've been creating this file in the host distro. Nuke the file
before we write to it.
BUG=b:191307774
TEST=`cros_sdk` still works
Change-Id: Ia07d1d4eeeb5bfabde07fb96e27d50fb5438e1b9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosutils/+/2986861
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Alex Klein <saklein@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
diff --git a/sdk_lib/make_chroot.sh b/sdk_lib/make_chroot.sh
index a651b70..6dcb257 100755
--- a/sdk_lib/make_chroot.sh
+++ b/sdk_lib/make_chroot.sh
@@ -209,6 +209,7 @@
"${FLAGS_chroot}/etc/portage/make.profile"
# Create make.conf.user .
+ rm -f "${FLAGS_chroot}"/etc/make.conf.user
cat <<\EOF > "${FLAGS_chroot}"/etc/make.conf.user
# This file is useful for doing global (chroot and all board) changes.
# Tweak emerge settings, ebuild env, etc...