diff options
Diffstat (limited to 'bitbake/lib/toaster/toastergui/views.py')
-rwxr-xr-x | bitbake/lib/toaster/toastergui/views.py | 38 |
1 files changed, 4 insertions, 34 deletions
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py index 4cd7afde7c..8148623a8b 100755 --- a/bitbake/lib/toaster/toastergui/views.py +++ b/bitbake/lib/toaster/toastergui/views.py | |||
@@ -2008,23 +2008,10 @@ if True: | |||
2008 | context_date,today_begin,yesterday_begin = _add_daterange_context(queryset_all, request, {'started_on','completed_on'}) | 2008 | context_date,today_begin,yesterday_begin = _add_daterange_context(queryset_all, request, {'started_on','completed_on'}) |
2009 | 2009 | ||
2010 | # set up list of fstypes for each build | 2010 | # set up list of fstypes for each build |
2011 | fstypes_map = {}; | 2011 | fstypes_map = {} |
2012 | |||
2012 | for build in build_info: | 2013 | for build in build_info: |
2013 | targets = Target.objects.filter( build_id = build.id ) | 2014 | fstypes_map[build.id] = build.get_image_file_extensions() |
2014 | comma = ""; | ||
2015 | extensions = ""; | ||
2016 | for t in targets: | ||
2017 | if ( not t.is_image ): | ||
2018 | continue | ||
2019 | tif = Target_Image_File.objects.filter( target_id = t.id ) | ||
2020 | for i in tif: | ||
2021 | s=re.sub('.*tar.bz2', 'tar.bz2', i.file_name) | ||
2022 | if s == i.file_name: | ||
2023 | s=re.sub('.*\.', '', i.file_name) | ||
2024 | if None == re.search(s,extensions): | ||
2025 | extensions += comma + s | ||
2026 | comma = ", " | ||
2027 | fstypes_map[build.id]=extensions | ||
2028 | 2015 | ||
2029 | # send the data to the template | 2016 | # send the data to the template |
2030 | context = { | 2017 | context = { |
@@ -3047,24 +3034,7 @@ if True: | |||
3047 | # translate the project's build target strings | 3034 | # translate the project's build target strings |
3048 | fstypes_map = {}; | 3035 | fstypes_map = {}; |
3049 | for project in project_info: | 3036 | for project in project_info: |
3050 | try: | 3037 | fstypes_map[project.id] = project.get_last_build_extensions() |
3051 | targets = Target.objects.filter( build_id = project.get_last_build_id() ) | ||
3052 | comma = ""; | ||
3053 | extensions = ""; | ||
3054 | for t in targets: | ||
3055 | if ( not t.is_image ): | ||
3056 | continue | ||
3057 | tif = Target_Image_File.objects.filter( target_id = t.id ) | ||
3058 | for i in tif: | ||
3059 | s=re.sub('.*tar.bz2', 'tar.bz2', i.file_name) | ||
3060 | if s == i.file_name: | ||
3061 | s=re.sub('.*\.', '', i.file_name) | ||
3062 | if None == re.search(s,extensions): | ||
3063 | extensions += comma + s | ||
3064 | comma = ", " | ||
3065 | fstypes_map[project.id]=extensions | ||
3066 | except (Target.DoesNotExist,IndexError): | ||
3067 | fstypes_map[project.id]=project.get_last_imgfiles | ||
3068 | 3038 | ||
3069 | context = { | 3039 | context = { |
3070 | 'mru' : build_mru, | 3040 | 'mru' : build_mru, |