diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2015-02-26 21:41:57 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-02-27 07:36:06 +0000 |
commit | 87c6a5482f9042c7dd663078f7ebe5222649a547 (patch) | |
tree | 293f96b1b60bfe7defe03b13a5b29a4b7261fd05 /bitbake | |
parent | f116c32f2a6ed34fc6ab34bae9e1a1e550724208 (diff) | |
download | poky-87c6a5482f9042c7dd663078f7ebe5222649a547.tar.gz |
bitbake: toaster: order layers with same priority
When we have multiple layers with the same priority, we
need to order them by date, newest first. The layer version
ID is a complete ordering by recent-ness, so it is suitable.
(Bitbake rev: 09171a892935d46ed32162b2d0f4a536c546facc)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/toaster/orm/models.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index 03efac4943..4fa9f81e46 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py | |||
@@ -994,7 +994,7 @@ class Layer_Version(models.Model): | |||
994 | query |= Q(projectlayer__project=project) | 994 | query |= Q(projectlayer__project=project) |
995 | 995 | ||
996 | return sorted( | 996 | return sorted( |
997 | Layer_Version.objects.filter(layer__name = self.layer.name).filter(query).select_related('layer_source', 'layer'), | 997 | Layer_Version.objects.filter(layer__name = self.layer.name).filter(query).select_related('layer_source', 'layer').order_by("-id"), |
998 | key = lambda x: _get_ls_priority(x.layer_source), | 998 | key = lambda x: _get_ls_priority(x.layer_source), |
999 | reverse = True) | 999 | reverse = True) |
1000 | 1000 | ||