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

Diff of /trunk/src/GLIArchitectureTemplate.py

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

Revision 131 Revision 133
1""" 1"""
2Gentoo Linux Installer 2Gentoo Linux Installer
3 3
4$Id: GLIArchitectureTemplate.py,v 1.12 2004/11/16 07:07:59 agaffney Exp $ 4$Id: GLIArchitectureTemplate.py,v 1.13 2004/11/19 03:02:27 agaffney Exp $
5Copyright 2004 Gentoo Technologies Inc. 5Copyright 2004 Gentoo Technologies Inc.
6 6
7 7
8The ArchitectureTemplate is largely meant to be an abstract class and an 8The ArchitectureTemplate is largely meant to be an abstract class and an
9interface (yes, it is both at the same time!). The purpose of this is to create 9interface (yes, it is both at the same time!). The purpose of this is to create
88 if not GLIUtility.exitsuccess(exitstatus): 88 if not GLIUtility.exitsuccess(exitstatus):
89 raise Stage2Error('fatal','stage2', "Building the system failed!") 89 raise Stage2Error('fatal','stage2', "Building the system failed!")
90 90
91 self._configuration.add_install_steps_completed("stage2") 91 self._configuration.add_install_steps_completed("stage2")
92 92
93 def preinstall(self): 93 def unpack_stage_tarball(self):
94 if not os.path.isdir(self._configuration.get_root_mount_point()): 94 if not os.path.isdir(self._chroot_dir):
95 os.makedirs(self._configuration.get_root_mount_point()) 95 os.makedirs(self._chroot_dir)
96
97 # Fetch and unpack the stage tarball here.
98 GLIUtility.fetch_and_unpack_tarball(self._install_profile.get_stage_tarball_uri(), self._configuration.get_root_mount_point(),keep_permissions=True) 96 GLIUtility.fetch_and_unpack_tarball(self._install_profile.get_stage_tarball_uri(), self._chroot_dir, keep_permissions=True)
99 97
98 def prepare_chroot(self):
100 ret = GLIUtility.spawn("cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf",True) 99 ret = GLIUtility.spawn("cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf",True)
101 if not GLIUtility.exitsuccess(ret): 100 if not GLIUtility.exitsuccess(ret):
102 raise CopyError('warning','preinstall','Could not copy resolv.conf!',True) 101 raise CopyError('warning','preinstall','Could not copy resolv.conf!',True)
103 102
104 ret = GLIUtility.spawn("mount -t proc none /mnt/gentoo /proc") 103 ret = GLIUtility.spawn("mount -t proc none /mnt/gentoo /proc")
107 106
108 # Set USE flags here 107 # Set USE flags here
109 # might want to rewrite/use _edit_config from the GLIInstallTemplate 108 # might want to rewrite/use _edit_config from the GLIInstallTemplate
110 # Then you should be done... at least with the preinstall. 109 # Then you should be done... at least with the preinstall.
111 110
112 def notify_frontend(self): 111 def notify_frontend(self, type, data):
113 os.kill(os.getpid(), SIGUSR1) 112 self._cc.addNotification(type, data)
114 113
115 def install_packages(self): 114 def install_packages(self):
116 "Will install any extra software!" 115 "Will install any extra software!"
117 # Dependency checking 116 # Dependency checking
118 self._depends("emerge system") 117 self._depends("emerge system")

Legend:
Removed from v.131  
changed lines
  Added in v.133

  ViewVC Help
Powered by ViewVC 1.1.20