diff sources/native-builds/gentoo-stage1-files/emerge_wrapper.sh @ 1202:75d179a52475

Bootstrapping gentoo portage tree. Download tarball, extract it, and emerge --sync. (Build rsync so emerge --sync works.)
author Rob Landley <rob@landley.net>
date Tue, 10 Aug 2010 11:00:33 -0500
parents 25607cc50c8f
children
line wrap: on
line diff
--- a/sources/native-builds/gentoo-stage1-files/emerge_wrapper.sh	Tue Aug 10 00:17:48 2010 -0500
+++ b/sources/native-builds/gentoo-stage1-files/emerge_wrapper.sh	Tue Aug 10 11:00:33 2010 -0500
@@ -13,16 +13,22 @@
 fi
 
 echo "Downloading portage tree..."
-cd /usr
+mkdir -p /var/log /usr/portage &&
+cd /usr &&
+#wget http://127.0.0.1/aboriginal/mirror/portage-latest.tar.bz2 -O - | \
 wget http://gentoo.osuosl.org/snapshots/portage-latest.tar.bz2 -O - | \
-  tar xjC /usr/portage
+  tar xjC /usr
 if [ ! -d portage ]
 then
   echo "Failed to download portage-latest tarball." >&2
   exit 1
 fi
 
-emerge.real --sync
+if ! emerge.real --sync
+then
+  echo "Sync failed"
+  exit 1
+fi
 
 cd $(dirname $(readlink -f $(which emerge.real)))
 mv emerge.real emerge