sb: Update download to check the config file for release URL control.

Provide without_release_url support in the configuration file so
the release tarball download of the kernel and tools uses the
release's top level directory and not the sources directory.

Closes #2481.
This commit is contained in:
Chris Johns 2016-03-14 16:23:19 +11:00
parent e8f351915e
commit 6e490ae1e1
3 changed files with 6 additions and 1 deletions

View File

@ -21,7 +21,8 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
%define rtems_kernel_compression xz
%endif
%source set rtems %{rtems_release_url}/%{rtems_kernel_version}/rtems-%{rtems_kernel_version}.tar.%{rtems_kernel_compression}
%define rtems_bootstrap 0
%define rtems_bootstrap 0
%define without_release_url
%else
%if ! %{defined rtems_kernel_version}
%define rtems_kernel_version HEAD

View File

@ -25,6 +25,7 @@
#
%if %{rsb_released}
%source set rtems-tools %{rtems_release_url}/%{rtems_tools_version}/rtems-tools-%{rtems_tools_version}.tar.xz
%define without_release_url
%else
#
# rtems_git_commit_hash : The commit hash else the branch is tracked.

View File

@ -566,6 +566,9 @@ def get_file(url, local, opts, config):
if version.released():
rtems_release_url = rtems_release_url_value
with_rel_url = opts.with_arg('release-url')
if with_rel_url[1] == 'not-found':
if config.defined('without_release_url'):
with_rel_url = ('without_release-url', 'yes')
if with_rel_url[0] == 'with_release-url':
if with_rel_url[1] == 'yes':
rtems_release_url = rtems_release_url_value