dev-install: use profile stacking instead of copying files
Instead of duplicating /etc/portage/ into /usr/local/etc/portage/, use
the parent profile to let portage stack /usr/local/etc/portage/ on top
of /etc/portage/ dynamically. This avoids confusing duplication and
takes care of the simple file that gmerge has been installing.
BUG=chromium:194889
TEST=precq passes & dev_install passes
CQ-DEPEND=CL:1497663
Change-Id: I54edf6142bb0a683837dbb65c63fb0b2abdef737
Reviewed-on: https://chromium-review.googlesource.com/1497668
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
diff --git a/dev-install/dev_install b/dev-install/dev_install
index cda89d8..21a6e41 100755
--- a/dev-install/dev_install
+++ b/dev-install/dev_install
@@ -136,10 +136,9 @@
# Configure emerge in /usr/local.
configure_emerge() {
# Copy emerge configuration to /usr/local.
- mkdir -p -m 0755 "${P_CONFIG_DEVELOPER}"
- # The source files might be symlinks, and we'll probably clobber/update things
- # ourselves locally, so dereference all the symlinks for our local copy.
- cp -rfL "${P_CONFIG_CROS}/make.profile" "${P_CONFIG_DEVELOPER}/make.profile"
+ mkdir -p -m 0755 "${P_CONFIG_DEVELOPER}/make.profile"
+ # Point our local profile to the rootfs one. This allows us to stack.
+ echo "${P_CONFIG_CROS}" > "${P_CONFIG_DEVELOPER}/make.profile/parent"
# Install the package.provided entries for the rootfs.
mkdir -p -m 0755 "${P_CONFIG_DEVELOPER}/make.profile/package.provided"