target.license_manifest_path = license_manifest_path
target.save()
+ def update_target_set_package_manifest(self, target, package_manifest_path):
+ target.package_manifest_path = package_manifest_path
+ target.save()
+
def update_task_object(self, build, task_name, recipe_name, task_stats):
"""
Find the task for build which matches the recipe and task name
machine = self.server.runCommand(['getVariable', 'MACHINE'])[0]
image_name = self.server.runCommand(['getVariable', 'IMAGE_NAME'])[0]
- # location of the image_license.manifest files for this build;
+ # location of the manifest files for this build;
# note that this file is only produced if an image is produced
license_directory = \
self.server.runCommand(['getVariable', 'LICENSE_DIRECTORY'])[0]
real_image_name,
'image_license.manifest')
+ image_package_manifest_path = os.path.join(
+ license_directory,
+ real_image_name,
+ 'image_license.manifest')
+
# if image_license.manifest exists, we can read the names of bzImage
# and modules files for this build from it, then look for them
# in the DEPLOY_DIR_IMAGE; note that this file is only produced
# store the license manifest path on the target
# (this file is also created any time an image file is created)
- license_path = os.path.join(license_directory,
+ license_manifest_path = os.path.join(license_directory,
real_image_name, 'license.manifest')
self.orm_wrapper.update_target_set_license_manifest(
- image_target, license_path)
+ image_target, license_manifest_path)
+
+ # store the package manifest path on the target (this file
+ # is created any time an image file is created)
+ package_manifest_path = os.path.join(deploy_dir_image,
+ real_image_name + '.rootfs.manifest')
+
+ if os.path.exists(package_manifest_path):
+ self.orm_wrapper.update_target_set_package_manifest(
+ image_target, package_manifest_path)
# scan the directory for image files relating to this build
# (via real_image_name); note that we don't have to set
--- /dev/null
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('orm', '0008_refactor_artifact_models'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='target',
+ name='package_manifest_path',
+ field=models.CharField(null=True, max_length=500),
+ ),
+ ]
is_image = models.BooleanField(default = False)
image_size = models.IntegerField(default=0)
license_manifest_path = models.CharField(max_length=500, null=True)
+ package_manifest_path = models.CharField(max_length=500, null=True)
def package_count(self):
return Target_Installed_Package.objects.filter(target_id__exact=self.id).count()
Target_Image_File object for an ext4 image being associated with a
target for a project which didn't produce an ext4 image (for example).
- Also sets the license_manifest_path of this target to the same path
- as that of target being cloned from, as the license manifest path is
- also a build artifact but is treated differently.
+ Also sets the license_manifest_path and package_manifest_path
+ of this target to the same path as that of target being cloned from, as
+ the manifests are also build artifacts but are treated differently.
"""
image_fstypes = self.build.get_image_fstypes()
kernel_file.save()
self.license_manifest_path = target.license_manifest_path
+ self.package_manifest_path = target.package_manifest_path
self.save()
def clone_sdk_artifacts_from(self, target):