aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-02-08toaster: Enable Image Customisation featuremichaelw/toaster/ic-7Michael Wood
Remove environment variable to toggle Image customisation feature Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-08toaster: xhr_customrecipe_packages Add dependencies to included packagesMichael Wood
Add the dependencies of packages which are added to the CustomImageRecipe. Currently just handle the first tier of dependencies as this is what we show in the UI. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-08toaster: orm generate_recipe_content only exclude locale packagesMichael Wood
Allow package groups in our custom image recipe. Excluding them creates more undefined behaviour than including them at this stage. Also update to use convenience method for returning all packages. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-08toaster: customrecipe page Add last successful build link and conditionalsMichael Wood
Add link to the last successful build if there is one and add conditionals for the ancillary recipe metadata. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-08toaster: models Add update_package_list for CustomImageRecipeMichael Wood
Add a method to update the packages included list from the last build, this effectively "synchronises" the package list from what we think will happen at the Customise image stage with what actually was produced with a build. It's not ideal to have this function here but we also need to make sure that no race condition of the user accessing this list and it being updated occurs. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-08toaster: orm Add last_updated field to CustomImageRecipeMichael Wood
Field to keep track of when the package list for the CustomImageRecipe was last updated from a build. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-08toaster: models add get_last_successful_built_target methodMichael Wood
Add a convenience method to get the last successful build target for a CustomImageRecipe. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-08toaster: pkg_dependencies_popover just show direct dependenciesMichael Wood
In the dependencies popover just show direct dependency in the list rather than recommends, conflicts etc Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-08toaster: models add all_depends method for Package_DependencyManagerMichael Wood
This convenience method returns just the Package_Dependency for the package which are regular dependencies i.e. not RECOMMENDS or any other types.
2016-02-08toaster: buildinfohelper CustomImagePackage update dependency infoMichael Wood
Instead of keeping the original dependency information for the pool of CustomImagePackage reset it with each new build. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-08toaster: newcustomimage_modal add frontend name validationMichael Wood
Add front end handling of validation response from create new CustomImageRecipe api. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-08toaster: API CustomImageRecipe check the recipe name supplied is validMichael Wood
Check that the name for a new CustomImageRecipe doesn't already exist in the project or in the database of existing recipes (e.g. from the layer index). Also restrict the characters entered for the recipe naming convention. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-08toaster: views CustomRecipe API add size information to the package listsMichael Wood
Add the file size of the packages and the total to the JSON response. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-08toaster: models Invalidate ToasterTables cache when a m2m field changesMichael Wood
Whem a m2m field changes we need to clear the ToasterTables cache as this can affect the state of items in ToasterTables. For example the CustomImagePackages being added or removed from a custom image recipe. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-08toaster: customrecipe Add dependency tracking to package selectionMichael Wood
Update the states of the packages in the package selection UI to reflect whether it's likely that 1st level dependencies for the package will be also added. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-08toaster: tables move template logic into the pkg_add_rm_btnMichael Wood
Instead of defining this as a string it's sufficiently large enough to warrant its own file. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-08toaster: CustomImageRecipe generate overwrite IMAGE_FEATURESMichael Wood
If we're breaking up an image recipe's packages we will also need to override IMAGE_FEATURES to make sure the customisation is not altered Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-08toaster: make locale packages uneditable in custom image pageElliot Smith
When the packages associated with a custom image recipe are shown in the customrecipe editing page, locale packages are shown in the same way as all other packages. This gives the false impression that these packages can be removed, when in fact they are automatically added due to the IMAGE_LINGUAS build variable. Modify the customrecipe page so that locale packages cannot be removed, and provide some help text explaining why. [YOCTO #8927] Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-02-08toaster: include locale and packagegroup packages in custom imageElliot Smith
The custom image editing page doesn't show locale and packagegroup packages: they are filtered out of the queryset used to populate the ToasterTable. Rather than filtering these packages out, include them in the list of packages which are shown. Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-02-08toaster: update custom image package table filtersElliot Smith
The custom image package selection filters were using the old ToasterTable filter approach, which caused the table filter to fail. Amend the table to use the new ToasterTable filtering API to fix this. Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-02-08toaster: move recent builds query to modelElliot Smith
The progress updater for the recent builds section makes a JSON call to the project view URL to get progress for each build. However, conversion of the builds pages to ToasterTable broke this, as the JSON response no longer contained the data necessary to populate the progress bars. Move the recent builds query to the Build model, so that it is accessible to the ToasterTables using it ("project builds" and "all builds"), as well as to the "project" view. Modify the code in the recent builds template to use the slightly different objects returned by the recent builds query on Build. Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-02-08toaster: update customimagerecipe migrationElliot Smith
When applying migrations, Django shows this warning: "Your models have changes that are not yet reflected in a migration, and so won't be applied." This is because the customimagerecipe model has changed, but those changes are not covered by a migration. Add the missing migration to clear this warning. Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-02-08toaster: add merge migration to resolve conflictElliot Smith
Django detects a conflict between a migration added to support image customisation and another migration which supports PROVIDES. Add a merge migration to resolve the conflict (as suggested by Django). Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-02-08toaster issues with IMAGE_FSTYPES *temporary* work-aroundRichard Purdie
Temporary work-around to fix issue with builds failing due to jffs2 and ext2 not being buildable, as provided by RP. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-02-08toaster: orm generate_recipe_file_contents Handler for require recipeMichael Wood
Add a special case for when the recipe we have based a custom image recipe on requires another recipe. In this case we need to adjust the file location to be able to require the recipe when we're in the toaster-custom-images layer. For example: "require core-image-minimal.bb" is changed to: "require recipes-core/images/core-image-minimal.bb" Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-08toaster: project builds Poll the server to get latest progress for buildMichael Wood
Poll the server for the project build progress value. This is something that will need to be re-done once we have a proper API for this on the server side. [YOCTO 8328] Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-08toaster: localhostbectrl Update the dirpath of customrecipe's base layerMichael Wood
We need to know the location of the based_on recipe's layer on the file system before we try and generate the custom image recipe. As we read the recipe to make the custom version. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-08toaster: tables Check layer presence in project for customise_btnMichael Wood
Make sure we send the current list of layers to the customise button to be able to know whether it should be set as an add layer button or a customise button on the New custom image page. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-08toaster: toastergui tests Add addtional data to the setUp for new tablesMichael Wood
Add additional data to the setUp to be able to test all the tables for Image Customisation. Also add the name of the table being tested to the num of rows assertion. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-05toaster: tables SelectPackagesTable rename recipe_id to custrecipeidMichael Wood
Rename the recipe_id to custrecipeid to avoid confusion about which type of object we're going to be accessing. This means that in the unit tests for tables we can pass a different kwargs for custom recipes vs normal recipes. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-05toaster: toastergui tests Update package test to use CustomImagePackageMichael Wood
Update test for adding and removing a package from a CustomImageRecipe so that it uses the CustomImagePackage and correct fields for the packages included. Change the test for error condition to use an invalid package id as ManyToMany remove() on package that isn't in the relationship does not throw an error. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-05toaster: customrecipe Add further front end features using new APIMichael Wood
This adds some basic package dependency hint modals when you add and remove a package. It also makes sure that if the CustomImageRecipe has no current included packages that we go and check this with the server to see if a relevant build has taken place which will provide this information. [YOCTO #8082] Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-05toaster: xhr_customrecipe_packages add GET info for package responseMichael Wood
Add response for GET to the xhr_customrecipe_packages ReST API /xhr_customrecipe/<recipe_id>/packages/<package_id> Thie response includes the id, name, version and dependency information for the package. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-05toaster: xhr_customrecipe_id change to use CustomImagePackageMichael Wood
Instead of doing a shallow copy of the package into the CustomImageRecipe when we add packages we can now use the CustomImagePackage as a M2M field on the Package to CustomImageRecipe. Also switch to using Target_Installed_Package as the method to retrieve the package list from the build. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-05toaster: API allow CustomImageRecipe to be updated after creationMichael Wood
When we create a CustomImageRecipe we create a Layer_Version and Recipe for that Recipe to be in, we only need one Layer_Version for our Recipes so if that Layer_Version is updated by building it we need a slightly more custom version of get_or_create to take into account the fields which we expect can change but still mean that the object we want is valid and doesn't need to be created. In the Recipe case this is when we're updating an existing CustomImageRecipe as we allow people to create a recipe even when the based on recipe hasn't been built so we need to update it once a build has happened. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-05toaster: tables Change SelectPackagesTable to use ProjectPackageMichael Wood
This changes the SelectPackagesTable to use the ProjectPackage table instead of very large expensive queries to retrieve a list of currently available packages for the project. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-05toaster: tables add recipe download link to CustomImagesTableMichael Wood
Add the download recipe link and fix the package count field. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-05toaster: newcustomimage_modal use libtoaster method for new CustomRecipeMichael Wood
Use libtoaster.createCustomRecipe rather than own implementation of this function. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-05toaster: libtoaster Add createCustomRecipe methodMichael Wood
This adds the function to call the ReSt API to create a custom image recipe. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-05toaster: orm Add convenience method to get all pkgs in a CustomImageRecipeMichael Wood
Returns a queryset of the all the packages that we expect to have in a CustomImageRecipe. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-05toaster: orm get_project_layer_versions to return layer_version objectsMichael Wood
Instead of returning layercommits return the actual Layer_Version objects for the layercommit as these are the useful objects which contain the metadata. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-05toaster: toastergui tests Add unit test for download custom recipeMichael Wood
Add unit test to test downloading end point and the basic content of the custom recipe that is generated. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-05toaster: toastergui tests Update to reflect changes to CustomImageRecipeMichael Wood
Now that CustomImageRecipe inherits from Recipe make sure that the accessors and the required values for Recipe are now setup correctly. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-05toaster: views xhr_customrecipe_packages clean up APIMichael Wood
- Fix generic variable names such as "object" and "values" when not needed. - Use try catch instead of a queryset filter to return the custom recipe object - Be explicit about the fields returned for the custom recipe info field - Remove redundant new_package field Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-05toaster: toastertable remove title from Show all in tableMichael Wood
Title is often very long so this is not a great property to use here. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-05toaster: Add recipe details pageMichael Wood
This page provides the details of recipes, showing their packages and additional metadata. It also allows you to build the recipe or customise the recipe if it is an image recipe. [YOCTO #8070] Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-05toaster: newcustomimage Move modal dialog out of newcustomimage templateMichael Wood
Move the modal template and JS out of the newcustomimage page so that it can also be used by the image details page. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-05toaster: Continue front end features to custom image recipe page.Michael Wood
Continuation of the work on the custom image recipe page, this brings in: - Basic notification of having added/removed a package. - Connect up Build button - Download recipe feature - No packages states - Project bread crumb - Display additional recipe metadata - Update accessors for recipe object inheritance changes [YOCTO #8082] Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-05toaster: tables Add table for Packages and update SelectPackagesTableMichael Wood
Create a Packages table for use as the image details page. Change the SelectPackagesTable table to inherit from the Packages table. Remove the need for a separate view by adding the additional template context items to the Table's page context. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-02-05toaster: views Add view to download custom recipeMichael Wood
View to provide the custom recipe download feature. The recipe is generated on-demand to make sure that it is the most current version of the Custom recipe. Signed-off-by: Michael Wood <michael.g.wood@intel.com>