~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to setup/build.py

  • Committer: William Grant
  • Date: 2008-07-07 05:12:47 UTC
  • Revision ID: wgrant@ugrad.unimelb.edu.au-20080707051247-nedz6xfjhdn1i1xx
setup: Add --norebuildjail option to build, to not re-debootstrap.

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
    parser.add_option("-n", "--dry",
55
55
        action="store_true", dest="dry",
56
56
        help="Print out the actions but don't do anything.")
 
57
    parser.add_option("-J", "--norebuildjail",
 
58
        action="store_true", dest="norebuildjail",
 
59
        help="Don't recreate jail/ - just update its IVLE code.")
57
60
    parser.add_option("-m", "--mirror",
58
61
        action="store", dest="apt_mirror",
59
62
        help="Sets the APT mirror used to build the jail.")
60
63
    (options, args) = parser.parse_args(args)
61
64
 
62
65
    # Call the real function
63
 
    __build(options.dry, options.apt_mirror)
 
66
    __build(options.dry, options.norebuildjail, options.apt_mirror)
64
67
 
65
 
def __build(dry=False,apt_mirror=None):
 
68
def __build(dry=False,norebuildjail=False,apt_mirror=None):
66
69
    # Importing configuration is a little tricky
67
70
    sys.path.append(os.pardir)
68
71
    import install_list
96
99
    action_runprog('make', [], dry)
97
100
    os.chdir(curdir)
98
101
 
99
 
    # Create the jail and its subdirectories
100
 
    # Note: Other subdirs will be made by copying files
101
 
    if apt_mirror != None:
102
 
        os.environ['MIRROR'] = apt_mirror
103
 
    action_runprog('./buildjail.sh', [], dry)
 
102
    if not norebuildjail:
 
103
        # Create the jail and its subdirectories
 
104
        # Note: Other subdirs will be made by copying files
 
105
        if apt_mirror != None:
 
106
            os.environ['MIRROR'] = apt_mirror
 
107
        action_runprog('./buildjail.sh', [], dry)
104
108
 
105
109
    # Copy all console and operating system files into the jail
106
110
    action_copylist(install_list.list_scripts, 'jail/opt/ivle', dry)