/[gli]/trunk/src/GLIArchitectureTemplate.py
Gentoo

Diff of /trunk/src/GLIArchitectureTemplate.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1279 Revision 1280
3# This source code is distributed under the terms of version 2 of the GNU 3# This source code is distributed under the terms of version 2 of the GNU
4# General Public License as published by the Free Software Foundation, a copy 4# General Public License as published by the Free Software Foundation, a copy
5# of which can be found in the main directory of this project. 5# of which can be found in the main directory of this project.
6Gentoo Linux Installer 6Gentoo Linux Installer
7 7
8$Id: GLIArchitectureTemplate.py,v 1.257 2006/01/08 05:09:14 codeman Exp $ 8$Id: GLIArchitectureTemplate.py,v 1.258 2006/02/07 02:05:38 agaffney Exp $
9 9
10The ArchitectureTemplate is largely meant to be an abstract class and an 10The ArchitectureTemplate is largely meant to be an abstract class and an
11interface (yes, it is both at the same time!). The purpose of this is to create 11interface (yes, it is both at the same time!). The purpose of this is to create
12subclasses that populate all the methods with working methods for that architecture. 12subclasses that populate all the methods with working methods for that architecture.
13The only definitions that are filled in here are architecture independent. 13The only definitions that are filled in here are architecture independent.
252 syspkgs = open("/usr/livecd/systempkgs.txt", "r") 252 syspkgs = open("/usr/livecd/systempkgs.txt", "r")
253 systempkgs = syspkgs.readlines() 253 systempkgs = syspkgs.readlines()
254 syspkgs.close() 254 syspkgs.close()
255 except: 255 except:
256 raise GLIException("CreateStage3Error", "fatal", "unpack_stage_tarball", "Could not open /usr/livecd/systempkgs.txt") 256 raise GLIException("CreateStage3Error", "fatal", "unpack_stage_tarball", "Could not open /usr/livecd/systempkgs.txt")
257# make_conf = self._install_profile.get_make_conf()
258# PKGDIR = '/usr/portage/packages'
259# PORTAGE_TMPDIR = '/var/tmp'
260# if 'PKGDIR' in make_conf: PKGDIR = make_conf['PKGDIR']
261# if 'PORTAGE_TMPDIR' in make_conf: PORTAGE_TMPDIR = make_conf['PORTAGE_TMPDIR']
262# GLIUtility.spawn("mkdir -p " + self._chroot_dir + PKGDIR)
263# GLIUtility.spawn("mkdir -p " + self._chroot_dir + PORTAGE_TMPDIR)
264# os.environ["PKGDIR"] = self._chroot_dir + PKGDIR
265# os.environ["PORTAGE_TMPDIR"] = self._chroot_dir + PORTAGE_TMPDIR
266# ret = GLIUtility.spawn("quickpkg $(sed -e 's:^:=:' /usr/livecd/systempkgs.txt)", display_on_tty8=True, logfile=self._compile_logfile, append_log=True)
267# if not GLIUtility.exitsuccess(ret):
268# raise GLIException("CreateStage3Error", "fatal", "unpack_stage_tarball", "Could not quickpkg necessary packages for generating stage3")
269# ret = GLIUtility.spawn("env ROOT=" + self._chroot_dir + " emerge -KO $(sed -e 's:^:=:' /usr/livecd/systempkgs.txt)", display_on_tty8=True, logfile=self._compile_logfile, append_log=True)
270# if not GLIUtility.exitsuccess(ret):
271# raise GLIException("CreateStage3Error", "fatal", "unpack_stage_tarball", "Could not emerge necessary packages in chroot for generating stage3")
272# del os.environ["PKGDIR"]
273# del os.environ["PORTAGE_TMPDIR"]
274 syspkglen = len(systempkgs) 257 syspkglen = len(systempkgs)
275 for i, pkg in enumerate(systempkgs): 258 for i, pkg in enumerate(systempkgs):
276 pkg = pkg.strip() 259 pkg = pkg.strip()
277 self.notify_frontend("progress", (float(i) / (syspkglen+1), "Copying " + pkg + " (" + str(i+1) + "/" + str(syspkglen) + ")")) 260 self.notify_frontend("progress", (float(i) / (syspkglen+1), "Copying " + pkg + " (" + str(i+1) + "/" + str(syspkglen) + ")"))
278 self._portage.copy_pkg_to_chroot(pkg, True) 261 self._portage.copy_pkg_to_chroot(pkg, True, ignore_missing=True)
279 self.notify_frontend("progress", (float(syspkglen) / (syspkglen+1), "Finishing")) 262 self.notify_frontend("progress", (float(syspkglen) / (syspkglen+1), "Finishing"))
280 GLIUtility.spawn("cp /etc/make.conf " + self._chroot_dir + "/etc/make.conf") 263 GLIUtility.spawn("cp /etc/make.conf " + self._chroot_dir + "/etc/make.conf")
281 GLIUtility.spawn("ln -s `readlink /etc/make.profile` " + self._chroot_dir + "/etc/make.profile") 264 GLIUtility.spawn("ln -s `readlink /etc/make.profile` " + self._chroot_dir + "/etc/make.profile")
282 GLIUtility.spawn("cp -f /etc/inittab.old " + self._chroot_dir + "/etc/inittab") 265 GLIUtility.spawn("cp -f /etc/inittab.old " + self._chroot_dir + "/etc/inittab")
283 chrootscript = r""" 266 chrootscript = r"""

Legend:
Removed from v.1279  
changed lines
  Added in v.1280

  ViewVC Help
Powered by ViewVC 1.1.20