Add sha256sum to Source model

Allow us to record a checksum for local sources (and potentially remote
ones if it is recorded in the recipe). This just adds the field, but
doesn't populate it.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
Paul Eggleton 2019-04-01 15:20:31 +13:00
parent 2b3e88345b
commit 44aa397fbe
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2019-04-01 03:20
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('layerindex', '0032_patchdisposition'),
]
operations = [
migrations.AddField(
model_name='source',
name='sha256sum',
field=models.CharField(blank=True, max_length=64),
),
]

View File

@ -524,6 +524,7 @@ class Recipe(models.Model):
class Source(models.Model):
recipe = models.ForeignKey(Recipe)
url = models.CharField(max_length=255)
sha256sum = models.CharField(max_length=64, blank=True)
def web_url(self):
def drop_dotgit(url):