changeset 1167:7317e9b51434

Yet more gentoo bootstrap plumbing. Needs target-specific stuff still.
author Rob Landley <rob@landley.net>
date Sun, 11 Jul 2010 00:02:44 -0500
parents fd57d7acb4e1
children 6dbab6f6001b
files sources/native-builds/gentoo-stage1-files/init
diffstat 1 files changed, 15 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/sources/native-builds/gentoo-stage1-files/init	Sat Jul 10 23:41:22 2010 -0500
+++ b/sources/native-builds/gentoo-stage1-files/init	Sun Jul 11 00:02:44 2010 -0500
@@ -18,8 +18,8 @@
 
 echo Started second stage init
 
-# Make a chroot by copying the root filesystem we've got into a new
-# (writeable) subdirectory.
+# If the root filesystem is read only (squashfs), copy it into a new chroot
+# directory under /home and restart in there.
 
 touch /.iswriteable 2>/dev/null
 rm /.iswriteable 2>/dev/null
@@ -89,16 +89,25 @@
 echo portage:x:250:250:portage:/var/tmp/portage:/bin/false >> /etc/passwd &&
 echo portage::250:portage >> /etc/group &&
 mkdir -p /usr/lib/portage &&
-cp -a bin pym /usr/lib/portage/ || exit 1
-for i in archive-conf dispatch-conf emaint emerge-webrsync env-update etc-update fixpackages quickpkg regenworld
+cp -a bin pym /usr/lib/portage/ &&
+echo /usr/lib/portage/pym > /usr/lib/python2.6/site-packages/gentoo.pth ||
+  exit 1
+
+for i in archive-conf dispatch-conf emaint emerge-webrsync env-update \
+         etc-update fixpackages quickpkg regenworld
 do
-  ln /usr/lib/portage/$i /usr/sbin/$i || exit 1
+  ln /usr/lib/portage/bin/$i /usr/sbin/$i || exit 1
 done
+
 for i in  ebuild egencache emerge portageq repoman
-  ln /usr/lib/portage/$i /usr/bin/$i || exit 1
+do
+  ln /usr/lib/portage/bin/$i /usr/bin/$i || exit 1
 done
+
 cp cnf/make.globals /etc/ &&
 cp man/*.1 /usr/man/man1 &&
 cp man/*.5 /usr/man/man5 &&
+mv /usr/bin/emerge /usr/bin/emerge.real &&
+mv /emerge_wrapper.sh /usr/bin/emerge
 
 cd /home || exit 1