~ltrager/maas/lp1654432_2.1

« back to all changes in this revision

Viewing changes to src/maasserver/bootresources.py

  • Committer: LaMont Jones
  • Date: 2016-10-12 15:26:17 UTC
  • mfrom: (5469 maas)
  • mto: This revision was merged to the branch mainline in revision 5482.
  • Revision ID: lamont@canonical.com-20161012152617-t14n2jt7y5b7hidb
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
316
316
            product['kflavor'] = resource.kflavor
317
317
        if resource.bootloader_type is not None:
318
318
            product['bootloader-type'] = resource.bootloader_type
 
319
        if resource.rolling:
 
320
            product['rolling'] = resource.rolling
319
321
        product.update(resource.extra)
320
322
        return product
321
323
 
491
493
                )
492
494
            )
493
495
            if has_kflavor:
494
 
                subarch = "%s-%s" % (subarch, kflavor)
 
496
                if 'edge' in subarch:
 
497
                    subarch_parts = subarch.split('-')
 
498
                    subarch_parts.insert(-1, kflavor)
 
499
                    subarch = '-'.join(subarch_parts)
 
500
                else:
 
501
                    subarch = "%s-%s" % (subarch, kflavor)
495
502
            architecture = '%s/%s' % (arch, subarch)
496
503
            series = product['release']
497
504
        else:
528
535
 
529
536
        resource.kflavor = kflavor
530
537
        resource.bootloader_type = bootloader_type
 
538
        resource.rolling = product.get('rolling', False)
531
539
 
532
540
        # Simplestreams content from maas.io includes the following
533
541
        # extra fields. Looping through the extra product data and adding it to
1295
1303
    create_gnupg_home()
1296
1304
 
1297
1305
    # Ensure that boot sources exist.
1298
 
    if not ensure_boot_source_definition():
1299
 
        # Nothing was created so cache the boot sources before import.
1300
 
        cache_boot_sources()
 
1306
    ensure_boot_source_definition()
 
1307
 
 
1308
    # Cache the boot sources before import.
 
1309
    cache_boot_sources()
1301
1310
 
1302
1311
    # FIXME: This modifies the environment of the entire process, which is Not
1303
1312
    # Cool. We should integrate with simplestreams in a more Pythonic manner.