/[gli]/branches/overhaul/src/fe/dialog/gli-dialog.py
Gentoo

Diff of /branches/overhaul/src/fe/dialog/gli-dialog.py

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

Revision 1678 Revision 1679
404 del mounts[idx] 404 del mounts[idx]
405 else: continue #catchall. 405 else: continue #catchall.
406 def set_partitions(self): 406 def set_partitions(self):
407 partitions_string1 = _(u"""The first thing on the new system to setup is the partitoning. 407 partitions_string1 = _(u"""The first thing on the new system to setup is the partitoning.
408 You will first select a drive and then edit its partitions. 408 You will first select a drive and then edit its partitions.
409 No changes will be saved until the end of the step. 409 WARNING: CHANGES ARE MADE IMMEDIATELY TO DISK. BE CAREFUL
410 No changes to your disk will be made until the installation.
411 NOTE: YOU MUST AT LEAST SELECT ONE PARTITION AS YOUR ROOT PARTITION "/" 410 NOTE: YOU MUST AT LEAST SELECT ONE PARTITION AS YOUR ROOT PARTITION "/"
412 If your drive is pre-partitioned, just select the mountpoints and make 411 If your drive is pre-partitioned, just select the mountpoints and make
413 sure that the format option is set to FALSE or it will erase your data. 412 sure that the format option is set to FALSE or it will erase your data.
414 The installer does not yet support resizing of partitions (its not safe). 413 The installer does not yet support resizing of partitions (its not safe).
414 When in doubt, **Partition it yourself and then re-run the installer**
415 Please refer to the Gentoo Installation Handbook for more information 415 Please refer to the Gentoo Installation Handbook for more information
416 on partitioning and the various filesystem types available in Linux.""") 416 on partitioning and the various filesystem types available in Linux.""")
417 self._d.msgbox(partitions_string1, height=17, width=78) 417 self._d.msgbox(partitions_string1, height=17, width=78)
418 drives = [] 418 drives = []
419 devices = {} 419 devices = {}
631############ STAGE3 FUNCTIONS ################# 631############ STAGE3 FUNCTIONS #################
632 632
633 def set_install_stage(self): 633 def set_install_stage(self):
634 if self.networkless: return 634 if self.networkless: return
635 # The install stage and stage tarball will be selected here 635 # The install stage and stage tarball will be selected here
636 if self.advanced_mode:
637 install_stages = (("1",_(u"Stage1 is used when you want to bootstrap&build from scratch.")),
638 ("2",_(u"Stage2 is used for building from a bootstrapped semi-compiled state.")),
639 ("3",_(u"Stage3 is a basic system that has been built for you (no compiling).")),
640 ("3+GRP", _(u"A Stage3 install but using binaries from the LiveCD when able.")))
641 else:
642 install_stages = (("3",_(u"Stage3 is a basic system that has been built for you (no compiling).")), 636 install_stages = (("3",_(u"Stage3 is a basic system that has been built for you (no compiling).")),
643 ("3+GRP", _(u"A Stage3 install but using binaries from the LiveCD when able."))) 637 ("3+GRP", _(u"A Stage3 install but using binaries from the LiveCD when able.")))
644 code, install_stage = self._d.menu(_(u"Which stage do you want to start at?"), choices=install_stages, cancel=_(u"Back"), width=78) 638 code, install_stage = self._d.menu(_(u"Which stage do you want to start at?"), choices=install_stages, cancel=_(u"Back"), width=78)
645 stage3warning = "" 639 stage3warning = ""
646 if code == self._DLG_OK: 640 if code == self._DLG_OK:
647 if install_stage == "3+GRP": 641 if install_stage == "3+GRP":
669 return 663 return
670 #Specify URI 664 #Specify URI
671 #subarches = { 'x86': ("x86", "i686", "pentium3", "pentium4", "athlon-xp"), 'hppa': ("hppa1.1", "hppa2.0"), 'ppc': ("g3", "g4", "g5", "ppc"), 'sparc': ("sparc32", "sparc64")} 665 #subarches = { 'x86': ("x86", "i686", "pentium3", "pentium4", "athlon-xp"), 'hppa': ("hppa1.1", "hppa2.0"), 'ppc': ("g3", "g4", "g5", "ppc"), 'sparc': ("sparc32", "sparc64")}
672 type_it_in = False 666 type_it_in = False
673 stage_tarball = "" 667 stage_tarball = ""
668 while (not stage_tarball) and (not GLIUtility.is_uri(stage_tarball)): #LOOP till valid.
674 if GLIUtility.ping("www.gentoo.org"): #Test for network connectivity 669 if GLIUtility.ping("www.gentoo.org"): #Test for network connectivity
675 mirrors = GLIUtility.list_mirrors() 670 mirrors = GLIUtility.list_mirrors()
676 mirrornames = [] 671 mirrornames = []
677 mirrorurls = [] 672 mirrorurls = []
678 for item in mirrors: 673 for item in mirrors:
679 mirrornames.append(item[1]) 674 mirrornames.append(item[1])
680 mirrorurls.append(item[0]) 675 mirrorurls.append(item[0])
681 code, mirror = self._d.menu(_(u"Select a mirror to grab the tarball from or select Cancel to enter an URI manually."), choices=self._dmenu_list_to_choices(mirrornames), width=77, height=20) 676 code, mirror = self._d.menu(_(u"Select a mirror to grab the tarball from or select Cancel to enter an URI manually."), choices=self._dmenu_list_to_choices(mirrornames), width=77, height=20)
682 if code != self._DLG_OK: 677 if code != self._DLG_OK:
683 type_it_in = True
684 else:
685 mirror = mirrorurls[int(mirror)-1]
686 tarballs = GLIUtility.list_stage_tarballs_from_mirror(mirror, self._arch)
687 code, stage_tarball = self._d.menu(_(u"Select your desired stage tarball:"), choices=self._dmenu_list_to_choices(tarballs), width=77, height=20)
688 if (code != self._DLG_OK):
689 type_it_in = True 678 type_it_in = True
690 else: 679 else:
680 mirror = mirrorurls[int(mirror)-1]
681 tarballs = GLIUtility.list_stage_tarballs_from_mirror(mirror, self._arch)
682 code, stage_tarball = self._d.menu(_(u"Select your desired stage tarball:"), choices=self._dmenu_list_to_choices(tarballs), width=77, height=20)
683 if (code != self._DLG_OK):
684 type_it_in = True
685 else:
691 stage_tarball = mirror + "/releases/" + self._arch + "/current/stages/" + tarballs[int(stage_tarball)-1] 686 stage_tarball = mirror + "/releases/" + self._arch + "/current/stages/" + tarballs[int(stage_tarball)-1]
692 #get portageq envvar value of cflags and look for x86, i686,etc. 687 #get portageq envvar value of cflags and look for x86, i686,etc.
693 #URL SYNTAX 688 #URL SYNTAX
694 #http://gentoo.osuosl.org/releases/ARCHITECTURE/current/stages/ 689 #http://gentoo.osuosl.org/releases/ARCHITECTURE/current/stages/
695 else: 690 else:
696 type_it_in = True 691 type_it_in = True
697 if type_it_in: 692 if type_it_in:
698 code, stage_tarball = self._d.inputbox(_(u"Specify the stage tarball URI or local file:"), init=self._install_profile.get_stage_tarball_uri()) 693 code, stage_tarball = self._d.inputbox(_(u"Specify the stage tarball URI or local file:"), init=self._install_profile.get_stage_tarball_uri())
699 if code != self._DLG_OK: 694 if code != self._DLG_OK:
700 return 695 return
701 #If Doing a local install, check for valid file:/// uri 696 #If Doing a local install, check for valid file:/// uri
702 if stage_tarball: 697 if stage_tarball:
703 if not GLIUtility.is_uri(stage_tarball): 698 if not GLIUtility.is_uri(stage_tarball):
704 self._d.msgbox(_(u"The specified URI is invalid. It was not saved. Please go back and try again.")); 699 self._d.msgbox(_(u"The specified URI is invalid. It was not saved. Please go back and try again."));
705 else: self._install_profile.set_stage_tarball_uri(None, stage_tarball, None) 700 else: self._install_profile.set_stage_tarball_uri(None, stage_tarball, None)
706 else: self._d.msgbox(_(u"No URI was specified!")) 701 else: self._d.msgbox(_(u"No URI was specified!"))
707 #if d.yesno("The specified URI is invalid. Use it anyway?") == DLG_YES: install_profile.set_stage_tarball_uri(None, stage_tarball, None)
708 702
709 def set_portage_tree(self): 703 def set_portage_tree(self):
710 # This section will ask whether to sync the tree, whether to use a snapshot, etc. 704 # This section will ask whether to sync the tree, whether to use a snapshot, etc.
711 if self._install_profile.get_dynamic_stage3(): #special case 705 if self._install_profile.get_dynamic_stage3(): #special case
712 try: 706 try:
2166 self.num_steps_completed += 1 2160 self.num_steps_completed += 1
2167 #print "Next step: " + next_step 2161 #print "Next step: " + next_step
2168 #if self._cc.has_more_steps(): 2162 #if self._cc.has_more_steps():
2169 self._cc.run_step(step_name) 2163 self._cc.run_step(step_name)
2170 continue 2164 continue
2171 if data == GLIClientController.INSTALL_DONE:
2172 self._d.gauge_update(100, _(u"Install completed!"), update_text=1)
2173 self._d.gauge_stop()
2174 print _(u"Install done!")
2175 sys.exit(0)
2176
2177 2165
2178# --------------------------End of functions------------------------ 2166# --------------------------End of functions------------------------
2179# --------------------------Beginning of MAIN----------------------- 2167# --------------------------Beginning of MAIN-----------------------
2180if __name__ == '__main__': 2168if __name__ == '__main__':
2181 2169
2193 gli.run_phase1() #Set up networking 2181 gli.run_phase1() #Set up networking
2194 gli.run_phase2() #Do partitioning 2182 gli.run_phase2() #Do partitioning
2195 gli.run_phase3() #Install stage tarball and portage 2183 gli.run_phase3() #Install stage tarball and portage
2196 gli.run_phase4() #Do everything else 2184 gli.run_phase4() #Do everything else
2197 2185
2198 2186 self._d.gauge_update(100, _(u"Install completed!"), update_text=1)
2187 self._d.gauge_stop()
2188 print _(u"Install done!")
2189 sys.exit(0)
2199 2190
2200 2191
2201#########################End of main################################# 2192#########################End of main#################################

Legend:
Removed from v.1678  
changed lines
  Added in v.1679

  ViewVC Help
Powered by ViewVC 1.1.20