~cubic-wizard/cubic/classic

« back to all changes in this revision

Viewing changes to usr/share/cubic/transitions.py

  • Committer: PJ Singh
  • Date: 2019-05-16 01:45:40 UTC
  • mfrom: (1.1.203 trunk)
  • Revision ID: psingh.cubic@gmail.com-20190516014540-v5tiivjaye9b9q7f
Merged from trunk revision 204. Fixed Bug #1827157, The vmlinuz and initrd versions listed on the ISO Boot Kernel tab do not match. Added initramfs-tools as a dependency to support querying initrd for version information. Fixed Bug #1827448, The generated checksum file has a repeated '*.md5.md5' extension. Fixed Bug #1828895, Cubic allows custom ISO image filenames without the '*.iso' extension. Fixed Bug #1827057, Going Back after Generate causes instability. Closed Bug #1825586, Using the original ISO bootstrap kernel causes BusyBox, when that kernel version has been removed in the chroot environment. This bug was extensively tested and could not be reproduced. Changes from revision 52 will remain. Fixed Bug #1829092, Add a progress bar for the 'Update the MD5 checksums for all files on the disk' step. Changed icon and image naming convention to match Gnome's convention: replaced '_' with '-' in all icon and image filenames.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1097
1097
    directory_2 = os.path.join(
1098
1098
        model.original_iso_image_mount_point,
1099
1099
        model.casper_relative_directory)
1100
 
    vmlinuz_version_details_list = utilities.create_vmlinuz_version_details_list(
 
1100
    kernel_details_list = utilities.create_kernel_details_list(
1101
1101
        directory_1,
1102
1102
        directory_2)
1103
1103
 
1112
1112
    area.set_orientation(Gtk.Orientation.VERTICAL)
1113
1113
    display.update_liststore(
1114
1114
        'options_page__linux_kernels_tab__liststore',
1115
 
        vmlinuz_version_details_list)
 
1115
        kernel_details_list)
1116
1116
 
1117
1117
    #
1118
1118
    # Preseed tab
1197
1197
        filepaths.append(filepath)
1198
1198
 
1199
1199
    # Get the selected kernel.
1200
 
    for selected_index, version_details in enumerate(vmlinuz_version_details_list):
1201
 
        if version_details[7]: break
 
1200
    for selected_index, kernel_details in enumerate(kernel_details_list):
 
1201
        if kernel_details[7]: break
1202
1202
    else: selected_index = 0
1203
1203
    logger.log_data('The selected kernel is index number', selected_index)
1204
1204
 
1205
1205
    # Add files to the stack, and search and replace text.
1206
1206
    stack_name = 'options_page__boot_configuration_tab__stack'
1207
1207
    search_text_1 = r'/vmlinuz\S*'
1208
 
    replacement_text_1 = '/%s' % vmlinuz_version_details_list[selected_index][2]
 
1208
    replacement_text_1 = '/%s' % kernel_details_list[selected_index][2]
1209
1209
    search_text_2 = r'/initrd\S*'
1210
 
    replacement_text_2 = '/%s' % vmlinuz_version_details_list[selected_index][4]
 
1210
    replacement_text_2 = '/%s' % kernel_details_list[selected_index][4]
1211
1211
    display.add_to_stack(
1212
1212
        stack_name,
1213
1213
        filepaths,
2125
2125
    display.update_label(
2126
2126
        'repackage_iso_page__update_disk_name_result_label',
2127
2127
        '...')
2128
 
    display.update_label(
2129
 
        'repackage_iso_page__update_md5_sums_result_label',
2130
 
        '...')
 
2128
    display.update_progressbar_percent(
 
2129
        'repackage_iso_page__update_checksums_progressbar',
 
2130
        0)
 
2131
    display.update_progressbar_text(
 
2132
        'repackage_iso_page__update_checksums_progressbar',
 
2133
        '')
2131
2134
    display.set_label_error(
2132
2135
        'repackage_iso_page__check_iso_size_result_label',
2133
2136
        False)
2153
2156
        'repackage_iso_page__update_disk_name',
2154
2157
        display.BULLET)
2155
2158
    display.update_status(
2156
 
        'repackage_iso_page__update_md5_sums',
 
2159
        'repackage_iso_page__update_checksums',
2157
2160
        display.BULLET)
2158
2161
    display.update_status('repackage_iso_page__check_iso_size', display.BULLET)
2159
2162
    display.update_status(
2226
2229
 
2227
2230
    # Update MD5 sums.
2228
2231
    display.update_status(
2229
 
        'repackage_iso_page__update_md5_sums',
 
2232
        'repackage_iso_page__update_checksums',
2230
2233
        display.PROCESSING)
2231
2234
    time.sleep(0.25)
2232
 
    utilities.update_md5_sums()
2233
 
    filepath = os.path.join(model.custom_live_iso_directory, 'md5sum.txt')
2234
 
    count = utilities.count_lines(filepath, thread)
2235
 
    logger.log_data(
2236
 
        'Number of checksums calculated and added to md5sum.txt',
2237
 
        count)
2238
 
    display.update_label(
2239
 
        'repackage_iso_page__update_md5_sums_result_label',
2240
 
        'Calculated and added checksums for %s files.' % count)
2241
 
    display.update_status('repackage_iso_page__update_md5_sums', display.OK)
 
2235
    checksums_filepath = os.path.join(
 
2236
        model.custom_live_iso_directory,
 
2237
        'md5sum.txt')
 
2238
    exclude_paths = [
 
2239
        os.path.join(model.custom_live_iso_directory,
 
2240
                     'isolinux'),
 
2241
        checksums_filepath
 
2242
    ]
 
2243
    count = utilities.update_md5_checksums(
 
2244
        checksums_filepath,
 
2245
        model.custom_live_iso_directory,
 
2246
        exclude_paths)
 
2247
    # count = utilities.count_lines(checksums_filepath, thread)
 
2248
    logger.log_data('Number of checksums calculated', count)
 
2249
    display.update_progressbar_text(
 
2250
        'repackage_iso_page__update_checksums_progressbar',
 
2251
        'Calculated checksums for %i files' % count)
 
2252
    display.update_status('repackage_iso_page__update_checksums', display.OK)
2242
2253
    time.sleep(1.00)
2243
2254
 
2244
2255
    # Check ISO size and create ISO image.