Bug 8705 - Store valid values for variables in the Toaster database
Summary: Store valid values for variables in the Toaster database
Status: NEW
Alias: None
Product: Toaster
Classification: Build System, Metadata & Runtime
Component: toaster (show other bugs)
Version: 2.0
Hardware: x86 Multiple
: Medium enhancement
Target Milestone: Future
Assignee: Toaster default assignee
QA Contact:
URL:
Whiteboard:
Depends on: 7596
Blocks:
  Show dependency tree
 
Reported: 2015-11-19 14:45 UTC by Belen Barros Pena
Modified: 2024-06-27 18:43 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Belen Barros Pena 2015-11-19 14:45:08 UTC
While fixing bug 7828, we came across something that has been coming up again and again as far as I can remember: how to keep the list of valid image types (the ones listed in the IMAGE_TYPES variable) up to date in Toaster (and before Toaster, in Hob). This enhancement is an attempt to solve this issue for good. 

It turns out those valid values are not stored in the Toaster database: right now they are hardcoded in the views.py file. And are, of course, out of date. 

IMAGE_TYPES / IMAGE_FSTYPES is not the only case where a variable has a set of valid values. There is PACKAGE_CLASSES, MACHINE_FEATURES, DISTRO_FEATURES and IMAGE_FEATURES. And we suspect there are others.

Ideally, Toaster would store up-to-date, valid values for all such variables (or, if not for all, at least for the most used). The main problem is how to get the list of valid values, since they are scattered around class and configuration files.
Comment 1 Belen Barros Pena 2016-02-11 18:27:04 UTC
After some discussion with Paul, turns out this bug depends on bug 7596, which in turn depends on 7985. 

Knowing the list of valid values for a certain value will also require some configuration parsing.
Comment 2 David Reyna 2018-08-15 09:02:03 UTC
There is still value in tracking this defect, even if the core bitbake enhancement 7596 is never fixed.

There are for example hard coded values in Toaster for common development variables, specifically "IMAGE_FSTYPES" that require manual updating, and are thus brittle.