diff options
author | Elliot Smith <elliot.smith@intel.com> | 2015-09-02 17:25:08 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-03 16:52:48 +0100 |
commit | 214ba674d057107688a281c542c21170657175e1 (patch) | |
tree | d99f0583a932d930e948c119d03bbf898550a82b /bitbake/lib/bb/ui/hob.py | |
parent | 5b26bbdfe17d36fbdbdeefe99c9054e7657b74fb (diff) | |
download | poky-214ba674d057107688a281c542c21170657175e1.tar.gz |
bitbake: toaster: Improve how default project is identified and fetched
Command line builds are associated with a "default project"
(as we currently require a build to have a project). This
acts as a container for builds initiated outside Toaster.
Currently, this project is marked as the default by its ID
being 0. However, this doesn't work with MySQL, as MySQL
won't allow 0 in a foreign key which references an
autoincrement field.
Instead, use an is_default field to track the default Project
for builds initiated outside Toaster.
Add a method to fetch this default project, rather than fetching
a project with a magic ID.
Add this default project in a migration, rather than as a side
effect of a get_or_create() style method.
Also ensure that builds always have a project explicitly assigned
to avoid any magic with a build's project foreign key defaulting to
0 (as it no longer does).
[YOCTO #7932]
(Bitbake rev: 71b709a1bbc26d89d61873763b467d21e625b274)
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/hob.py')
0 files changed, 0 insertions, 0 deletions