mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 12:49:01 +02:00

Provide a mechanism set the maintainer for things like gcc-cross-<arch> to the same as gcc. (We do have entries in the .inc file for these, however they aren't useful as they don't match the recipe name when we parse it, and due to the fact that RecipeMaintainer objects link directly to Recipe objects, we can't handle entries that don't map to a real recipe). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
41 lines
1.5 KiB
Python
41 lines
1.5 KiB
Python
# -*- coding: utf-8 -*-
|
|
from __future__ import unicode_literals
|
|
|
|
from django.db import migrations, models
|
|
|
|
|
|
def insert_initial_link_data(apps, schema_editor):
|
|
RecipeMaintenanceLink = apps.get_model('rrs', 'RecipeMaintenanceLink')
|
|
|
|
r = RecipeMaintenanceLink(pn_match='gcc-cross-*', pn_target='gcc')
|
|
r.save()
|
|
r = RecipeMaintenanceLink(pn_match='gcc-crosssdk-*', pn_target='gcc')
|
|
r.save()
|
|
r = RecipeMaintenanceLink(pn_match='gcc-source-*', pn_target='gcc')
|
|
r.save()
|
|
r = RecipeMaintenanceLink(pn_match='binutils-cross-*', pn_target='binutils')
|
|
r.save()
|
|
r = RecipeMaintenanceLink(pn_match='binutils-crosssdk-*', pn_target='binutils')
|
|
r.save()
|
|
r = RecipeMaintenanceLink(pn_match='gdb-cross-*', pn_target='gdb')
|
|
r.save()
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('rrs', '0009_rmh_layerbranch'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='RecipeMaintenanceLink',
|
|
fields=[
|
|
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
|
|
('pn_match', models.CharField(max_length=100, help_text='Expression to match against pn of recipes that should be linked (glob expression)')),
|
|
('pn_target', models.CharField(max_length=100, help_text='Name of recipe to link to')),
|
|
],
|
|
),
|
|
migrations.RunPython(insert_initial_link_data, reverse_code=migrations.RunPython.noop),
|
|
]
|