setup_board: seed make.conf.user with tips
It's easy to do the wrong thing in this file. Seed it with some useful
comments to try and head that off.
BUG=None
TEST=`rm /etc/make.conf.user && ./setup_board --board=lumpy` setup a comment filled file
TEST=`echo '#' > /etc/make.conf.user && ./setup_board --board=lumpy` left existing file alone
Change-Id: I23405818f03972d5bb930f4c4b80912c2c67b3de
Reviewed-on: https://gerrit.chromium.org/gerrit/44022
Reviewed-by: Daniel Erat <derat@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
diff --git a/setup_board b/setup_board
index 57e969c..653612e 100755
--- a/setup_board
+++ b/setup_board
@@ -423,8 +423,22 @@
fi
fi
# Setup make.globals and the profile.
+if [[ ! -e /etc/make.conf.user ]]; then
+ sudo_clobber /etc/make.conf.user <<\EOF
+# This file is useful for doing global (chroot and all board) changes.
+# Tweak emerge settings, ebuild env, etc...
+#
+# Make sure to append variables unless you really want to clobber all
+# existing settings. e.g. You most likely want:
+# FEATURES="${FEATURES} ..."
+# USE="${USE} foo"
+# and *not*:
+# USE="foo"
+#
+# This also is a good place to setup ACCEPT_LICENSE.
+EOF
+fi
cmds=(
- "touch /etc/make.conf.user"
"ln -sf /etc/make.globals '${BOARD_ROOT}/etc/make.globals'"
"ln -sf /etc/make.conf.user '${BOARD_ROOT}/etc/make.conf.user'"
"mkdir -p '${BOARD_ROOT}/etc/portage/hooks'"