aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-01-14IC dependency handling WIPmichaelw/toaster/ic-6Michael Wood
model change un-generated migration
2016-01-12toaster: 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-01-12toaster: 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-01-12toaster: 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-01-12toaster: 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-01-12toaster: 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-01-12toaster: 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-01-12toaster: 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-01-12toaster: 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-01-12toaster: 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-01-12toaster: 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-01-12toaster: 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-01-12toaster: 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-01-12toaster: 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-01-12toaster: 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-01-12toaster: 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-01-12toaster: 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-01-12toaster: 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-01-12toaster: 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-01-12toaster: 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-01-12toaster: 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-01-12toaster: 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-01-12toaster: 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-01-12toaster: 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-01-12toaster: 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-01-12toaster: 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-01-12toaster: 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>
2016-01-12toaster: move CustomImageRecipe generation to API entry pointMichael Wood
Use the CustomImageRecipe generate_recipe_file_contents to generate the recipe that we build from. Move creation of the dummy layer and recipe object to the point of recipe creation as we need these objects before the build time. Also update the methods to add and remove packages to account for the CustomImageRecipe inheriting from Recipe. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-01-12toaster: orm add CustomImageRecipe generate contents functionMichael Wood
Add function generate_recipe_file_contents to dump the custom image recipe instance to a string for use either to push to the user as a downloaded version of their custom image recipe or to use to generate the recipe that we build. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-01-12toaster: buildinfohelper Add the concept of CustomImagePackageMichael Wood
This adds the concept of CustomImagePackage this is similar to the way layers and recipes work in that we have a set of data which is part of the build history and a set of data which is part of the configuration data that toaster uses to guide people in configuring their project. We create a set of built_packages for every build but only create a package for configuration purposes if we don't already have one, so that the CustomImagePackage only ever contains a unique list of packages that are available to be added and removed from a CustomImageRecipe. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-01-12toaster: orm: Add db migration for new CustomImagePackage tableMichael Wood
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-01-12toaster: orm Add CustomImagePackage tableMichael Wood
This table is used to track all the available packages in the current toaster. Many of these packages belong to many CustomImageRecipes. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-01-12toaster: orm: Add db migration for new CustomImageRecipe inheritance changeMichael Wood
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-01-12toaster: orm make CustomImageRecipe inherit from RecipeMichael Wood
This allows us to re-use the properties of a recipe for the custom image recipes as well as re-using the existing templates and logic that deals with recipe objects. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-01-12toaster: orm Add sum of dependencies size function to PackageDependencyManagerMichael Wood
Add function that returns the Sum of the size of all the packages which depend on a package. Access get_total_source_deps_size via a packages's dependency manager. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-01-12toaster: tablejs Add an event handler to manually trigger a data reloadMichael Wood
Allow users of ToasterTable to manually trigger a refresh of the data. This can be useful if an action has happened in-page and the data is now invalid. Such as new data being added or removed from the model. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-01-12toaster: ToasterTables simplify filter function move common part to widgetMichael Wood
Move part of the functionality of the filter functions to the Table widget. We don't need to implement it in each subclass. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-01-12toaster: models fall back to a sensible string for no vcs referenceMichael Wood
Fall back to a 'n/a' string for the vcs reference, not all our source has to be in a vcs and therefore it is legitimate for this to be none. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-01-12toaster: localhostbecontroller CustomRecipe now base_recipe is RecipeMichael Wood
Update the reference to the base_recipe. It is now a Recipe object rather than an intermediate AvailableRecipe object. Therefore doesn't need an extra traverse down the object hierarchy. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-01-11toaster: settings Add uid to the toaster cache dirMichael Wood
Make the default toaster cache dir unique to the user running toaster. If we have multiple users running toaster we previously got a permission denied exception on saving a cache file. [YOCTO #8782] Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-01-11toaster: show 'satisfied via' text for reverse depsEd Bartosh
Showed '<dependency> satisfied via <provider>' text and help tooltip for the reverse build dependencies provided through 'PROVIDES' in the 'Reverse build dependencies' tab. [YOCTO #6169] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-01-11toaster: show 'satisfied via' text for build depsEd Bartosh
Showed '<dependency> satisfied via <provider>' text and help tooltip for the build dependencies provided through 'PROVIDES' in the 'Build dependencies' tab. [YOCTO #6169] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-01-11toaster: show list of provides for the recipeEd Bartosh
Showed list of names that recipe provides. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-01-11buildinfohelper: add provides info to the dbEd Bartosh
Added new entries to Provides model and link them to Recipe_Dependency using 'via' field. This data will be used by Toaster UI to show 'Provides:' information for the recipes. [YOCTO #6169] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-01-11toaster: add Provider modelEd Bartosh
Added new model Provider and a foreign key 'via' to link Recipe_Dependency to it. [YOCTO #6169] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-01-11buildinfohelper: use providermapEd Bartosh
Used providermap in store_dependency_information function to find virtual dependencies. This should fix annoying warnings "stpd: KeyError saving recipe dependency" [YOCTO #6169] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-01-11cooker: add providermap to dep_treeEd Bartosh
Added providermap information to the result of buildDependTree API. This will be used by Toaster to map virtual dependencies to recipes. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-01-11taskdata: refactor get_providermapEd Bartosh
Added optional parameter 'prefix' to filter out names that don't start with specified prefix. Changed existing call of get_providermap according to changed API. Optimized the code: got rid of extra loop and temporary list variable virts. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-01-11toaster-manual: describe the way to start ToasterEd Bartosh
Recently the way to start Toaster has been simplified. The only way to start it now is to source toaster script. Builds can be run either from command line or from Toaster web interface. Updated instructions to start toaster according to the changes described above. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-01-11toaster: tests Remove symlinks from toasteruitest folderMihail Stanciu
Remove symlinks in the UI tests folder as they are causing problems for bitbake upstream. [YOCTO #8787] Signed-off-by: Mihail Stanciu <stanciux.mihail@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com>