[rtems-source-builder commit] sb: Update download to check the config file for release URL control.
Chris Johns
chrisj at rtems.org
Mon Mar 14 05:30:22 UTC 2016
Module: rtems-source-builder
Branch: master
Commit: 6e490ae1e1c11825eeeef36e802a5a3c426435de
Changeset: http://git.rtems.org/rtems-source-builder/commit/?id=6e490ae1e1c11825eeeef36e802a5a3c426435de
Author: Chris Johns <chrisj at rtems.org>
Date: Mon Mar 14 16:23:19 2016 +1100
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.
---
rtems/config/tools/rtems-kernel-4-1.cfg | 3 ++-
rtems/config/tools/rtems-tools-1.cfg | 1 +
source-builder/sb/download.py | 3 +++
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/rtems/config/tools/rtems-kernel-4-1.cfg b/rtems/config/tools/rtems-kernel-4-1.cfg
index d6c1f5b..e5d115c 100644
--- a/rtems/config/tools/rtems-kernel-4-1.cfg
+++ b/rtems/config/tools/rtems-kernel-4-1.cfg
@@ -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
diff --git a/rtems/config/tools/rtems-tools-1.cfg b/rtems/config/tools/rtems-tools-1.cfg
index b03b7ad..bde2ce5 100644
--- a/rtems/config/tools/rtems-tools-1.cfg
+++ b/rtems/config/tools/rtems-tools-1.cfg
@@ -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.
diff --git a/source-builder/sb/download.py b/source-builder/sb/download.py
index affaa65..355cd4a 100644
--- a/source-builder/sb/download.py
+++ b/source-builder/sb/download.py
@@ -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
More information about the vc
mailing list