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.

TEST=precq passes & dev_install passes

Change-Id: I54edf6142bb0a683837dbb65c63fb0b2abdef737
Commit-Ready: Mike Frysinger <>
Tested-by: Mike Frysinger <>
Reviewed-by: Amin Hassani <>
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"