Add enable 32bit to build lists to add i686 repos for x86_64 builds

This commit is contained in:
Wedge 2020-04-01 20:45:07 +03:00
parent 1e50cec5af
commit 62b8b3524d
6 changed files with 29 additions and 4 deletions

View File

@ -506,6 +506,16 @@ class BuildList < ActiveRecord::Base
h["#{prefix}release"] = insert_token_to_path(path + 'release', repo.platform) h["#{prefix}release"] = insert_token_to_path(path + 'release', repo.platform)
h["#{prefix}updates"] = insert_token_to_path(path + 'updates', repo.platform) if repo.platform.main? h["#{prefix}updates"] = insert_token_to_path(path + 'updates', repo.platform) if repo.platform.main?
h["#{prefix}testing"] = insert_token_to_path(path + 'testing', repo.platform) if include_testing_subrepository? h["#{prefix}testing"] = insert_token_to_path(path + 'testing', repo.platform) if include_testing_subrepository?
if enable_32bit? && arch.name == 'x86_64'
path, prefix = repo.platform.public_downloads_url(
repo.platform.main? ? nil : build_for_platform.name,
'i686',
repo.name
), "#{repo.platform.name}_#{repo.name}32_"
h["#{prefix}release"] = insert_token_to_path(path + 'release', repo.platform)
h["#{prefix}updates"] = insert_token_to_path(path + 'updates', repo.platform) if repo.platform.main?
h["#{prefix}testing"] = insert_token_to_path(path + 'testing', repo.platform) if include_testing_subrepository?
end
end end
end end
host = EventLog.current_controller.request.host_with_port rescue ::Rosa::Application.config.action_mailer.default_url_options[:host] host = EventLog.current_controller.request.host_with_port rescue ::Rosa::Application.config.action_mailer.default_url_options[:host]

View File

@ -74,6 +74,7 @@ class BuildListPolicy < ApplicationPolicy
save_to_repository_id save_to_repository_id
use_cached_chroot use_cached_chroot
use_extra_tests use_extra_tests
enable_32bit
) )
pa << { pa << {
include_repos: [], include_repos: [],

View File

@ -22,12 +22,16 @@ h4.offset10= t("activerecord.attributes.build_list.preferences")
name= 'build_list[auto_create_container]' ] name= 'build_list[auto_create_container]' ]
= BuildList.human_attribute_name :auto_create_container = BuildList.human_attribute_name :auto_create_container
- %i(include_testing_subrepository use_cached_chroot use_extra_tests save_buildroot native_build).each do |kind| - %i(include_testing_subrepository use_cached_chroot use_extra_tests save_buildroot native_build enable_32bit).each do |kind|
.checkbox .checkbox
label label
- puts "#{kind} #{params[:build_list].try(:[], kind)}"
- checked = params[:build_list].try(:[], kind) || kind == :use_cached_chroot - checked = params[:build_list].try(:[], kind) || kind == :use_cached_chroot
- checked = @build_list.send(kind) if checked.nil? - checked = @build_list.send(kind) if checked.nil?
= f.check_box kind, {}, "true", "false" - if checked
= f.check_box kind, { checked: true }, "true", "false"
- else
= f.check_box kind, {}, "true", "false"
= BuildList.human_attribute_name kind = BuildList.human_attribute_name kind
- selected = params[:build_list].try(:[], :external_nodes) - selected = params[:build_list].try(:[], :external_nodes)

View File

@ -102,6 +102,10 @@ div[ ng-controller='BuildListController'
td= t('activerecord.attributes.build_list.save_buildroot') td= t('activerecord.attributes.build_list.save_buildroot')
td= t("layout.#{@build_list.save_buildroot?}_") td= t("layout.#{@build_list.save_buildroot?}_")
tr
td= 'Enable 32bit'
td= @build_list.enable_32bit
tr tr
td= t('activerecord.attributes.build_list.project_version') td= t('activerecord.attributes.build_list.project_version')
td= @build_list.project_version td= @build_list.project_version
@ -197,4 +201,4 @@ div[ ng-controller='BuildListController'
rd-widget-body rd-widget-body
= form_for @build_list, url: publish_build_list_path(@build_list), html: {class: :"form-inline"} do |f| = form_for @build_list, url: publish_build_list_path(@build_list), html: {class: :"form-inline"} do |f|
.buttons-block .buttons-block
= render 'buttons', build_list: @build_list = render 'buttons', build_list: @build_list

View File

@ -0,0 +1,5 @@
class AddEnable32BitToBuildLists < ActiveRecord::Migration
def change
add_column :build_lists, :enable_32bit, :bool, default: false
end
end

View File

@ -11,7 +11,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20200121215842) do ActiveRecord::Schema.define(version: 20200401170442) do
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "plpgsql" enable_extension "plpgsql"
@ -103,6 +103,7 @@ ActiveRecord::Schema.define(version: 20200121215842) do
t.string "hostname" t.string "hostname"
t.string "fail_reason" t.string "fail_reason"
t.boolean "native_build", :default=>false t.boolean "native_build", :default=>false
t.boolean "enable_32bit", :default=>false
end end
add_index "build_lists", ["project_id", "save_to_repository_id", "build_for_platform_id", "arch_id"], :name=>"maintainer_search_index" add_index "build_lists", ["project_id", "save_to_repository_id", "build_for_platform_id", "arch_id"], :name=>"maintainer_search_index"