diff --git a/app/models/build_list.rb b/app/models/build_list.rb index 01fea4b0a..6488a8638 100644 --- a/app/models/build_list.rb +++ b/app/models/build_list.rb @@ -409,12 +409,6 @@ class BuildList < ActiveRecord::Base repos = include_repos include_repos_hash = {}.tap do |h| Repository.where(:id => (repos | (extra_repositories || [])) ).each do |repo| - # Path looks like: - # http://abf-downloads.rosalinux.ru/rosa-server2012/repository/x86_64/base/ - # http://abf-downloads.rosalinux.ru/uname_personal/repository/rosa-server2012/x86_64/base/ - # so, we should append: - # - release - # - updates path = repo.platform.public_downloads_url( repo.platform.main? ? nil : build_for_platform.name, arch.name, diff --git a/app/models/platform.rb b/app/models/platform.rb index db4dfa70a..67ad038ff 100644 --- a/app/models/platform.rb +++ b/app/models/platform.rb @@ -91,6 +91,9 @@ class Platform < ActiveRecord::Base Rails.root.join("public", "downloads", name) end + # Returns URL to repository, for example: + # - http://abf-downloads.rosalinux.ru/rosa-server2012/repository/x86_64/base/ + # - http://abf-downloads.rosalinux.ru/uname_personal/repository/rosa-server2012/x86_64/base/ def public_downloads_url(subplatform_name = nil, arch = nil, repo = nil) "#{APP_CONFIG['downloads_url']}/#{name}/repository/".tap do |url| url << "#{subplatform_name}/" if subplatform_name.present?