/[gli]/trunk/src/tests/install.py
Gentoo

Diff of /trunk/src/tests/install.py

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

Revision 224 Revision 225
2 2
3import sys 3import sys
4import GLIUtility 4import GLIUtility
5import GLIArchitectureTemplate 5import GLIArchitectureTemplate
6import GLIInstallProfile 6import GLIInstallProfile
7import GLIClientConfiguration
7 8
8def usage(): 9def usage():
9 print "Usage: " + sys.argv[0] + " <installprofile.xml> [command [command ...]]\n" 10 print "Usage: " + sys.argv[0] + " <installprofile.xml> [command [command ...]]\n"
10 print "command is one of:\n" 11 print "command is one of:\n"
11 print "\tpartition add, remove, and resize partitions" 12 print "\tpartition add, remove, and resize partitions"
42if not GLIUtility.is_file(xmlfile): 43if not GLIUtility.is_file(xmlfile):
43 print "The XML file '" + xmlfile + "' cannot be accessed.\n" 44 print "The XML file '" + xmlfile + "' cannot be accessed.\n"
44 usage() 45 usage()
45 sys.exit(1) 46 sys.exit(1)
46 47
48client_profile = GLIClientConfiguration.ClientConfiguration()
49client_profile.set_root_mount_point(None, "/mnt/gentoo", None)
47install_profile = GLIInstallProfile.InstallProfile() 50install_profile = GLIInstallProfile.InstallProfile()
48install_profile.parse(xmlfile) 51install_profile.parse(xmlfile)
52
53template = __import__('templates' + '/' + 'x86ArchitectureTemplate')
54archtemplate = getattr(template, 'x86ArchitectureTemplate')(client_profile, install_profile, False)
55
49archtemplate = GLIArchitectureTemplate.ArchitectureTemplate(install_profile=install_profile) 56#archtemplate = GLIArchitectureTemplate.ArchitectureTemplate(install_profile=install_profile)
50 57
51operations = { 58operations = {
52 'partition': archtemplate.do_partitioning, 59 'partition': archtemplate.partition,
53 'mount': archtemplate.mount_local_partitions, 60 'mount': archtemplate.mount_local_partitions,
54 'mount_net': archtemplate.mount_network_shares, 61 'mount_net': archtemplate.mount_network_shares,
55 'unpack': archtemplate.unpack_stage_tarball, 62 'unpack': archtemplate.unpack_stage_tarball,
56 'prep_make_conf': archtemplate.configure_make_conf, 63 'prep_make_conf': archtemplate.configure_make_conf,
57 'portage_tree': archtemplate.install_portage_tree, 64 'portage_tree': archtemplate.install_portage_tree,

Legend:
Removed from v.224  
changed lines
  Added in v.225

  ViewVC Help
Powered by ViewVC 1.1.20