From 0312ad3461b42e8f3e673c4c6fee171e55176ad9 Mon Sep 17 00:00:00 2001 From: wiktor w brodlo Date: Wed, 17 Aug 2011 00:24:06 +0000 Subject: Proper stage3 fetching --- gentoo/utils.py | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/gentoo/utils.py b/gentoo/utils.py index 808202b..507ac82 100644 --- a/gentoo/utils.py +++ b/gentoo/utils.py @@ -757,8 +757,27 @@ class GentooInstall: """ This function copies the stage3 into self._root """ - - + action = _("Downloading stage3...") + + if os.environ["ANACONDA_PRODUCTARCH"] == "x86": + arch = "x86" + cpu = "i686" + if os.environ["ANACONDA_PRODUCTARCH"] == "amd64": + arch = "amd64" + cpu = "amd64" + + latest_stage = "http://distfiles.gentoo.org/releases/%s/autobuilds/latest-stage3-%s.txt" % (arch, cpu) + + os.system("wget -nc -O /tmp/latest-stage %s " % latest_stage) + f = open("/tmp/latest-stage") + + lines = f.read().split("\n") + stage = lines[2] + + stageurl = "http://distfiles.gentoo.org/releases/%s/autobuilds/%s" % (arch, stage) + + os.system("wget -nc -O "+productPath+" %s " % stageurl) + action = _("Unpacking stage3") anaconda._intf.instProgress.terminal.run_command("tar xvjpf "+productPath+" -C "+self._root) -- cgit v1.2.3-65-gdbad