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.
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.
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.