mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00
Add --no-download to disable the downloader.
This commit is contained in:
parent
cc2c48ba88
commit
5e02e80d5a
@ -371,9 +371,9 @@ remove the parts you do not have write access too or you may need to unpack the
|
||||
tar file somewhere and copy the file tree from the level you have write access
|
||||
from. Embedding the full prefix path in the tar files lets you know what the
|
||||
prefix is and is recommended. For example if
|
||||
`/home/chris/development/rtems/4.11` is the prefix used you cannot
|
||||
change directory to the root (`/`) and install because the `/home` is root
|
||||
access only. To install you would:
|
||||
`/home/chris/development/rtems/4.11` is the prefix used you cannot change
|
||||
directory to the root (`/`) and install because the `/home` is root access
|
||||
only. To install you would:
|
||||
|
||||
-------------------------------------------------------------
|
||||
$ cd
|
||||
@ -1541,6 +1541,7 @@ Options and arguments:
|
||||
--macros file[,[file] : Macro format files to load after the defaults
|
||||
--log file : Log file where all build out is written too
|
||||
--url url[,url] : URL to look for source
|
||||
--no-download : Disable the source downloader
|
||||
--targetcflags flags : List of C flags for the target code
|
||||
--targetcxxflags flags : List of C++ flags for the target code
|
||||
--libstdcxxflags flags : List of C++ flags to build the target libstdc++ code
|
||||
@ -1582,6 +1583,7 @@ Options and arguments:
|
||||
--macros file[,[file] : Macro format files to load after the defaults
|
||||
--log file : Log file where all build out is written too
|
||||
--url url[,url] : URL to look for source
|
||||
--no-download : Disable the source downloader
|
||||
--targetcflags flags : List of C flags for the target code
|
||||
--targetcxxflags flags : List of C++ flags for the target code
|
||||
--libstdcxxflags flags : List of C++ flags to build the target libstdc++ code
|
||||
@ -1618,6 +1620,7 @@ Options and arguments:
|
||||
--macros file[,[file] : Macro format files to load after the defaults
|
||||
--log file : Log file where all build out is written too
|
||||
--url url[,url] : URL to look for source
|
||||
--no-download : Disable the source downloader
|
||||
--targetcflags flags : List of C flags for the target code
|
||||
--targetcxxflags flags : List of C++ flags for the target code
|
||||
--libstdcxxflags flags : List of C++ flags to build the target libstdc++ code
|
||||
@ -1690,6 +1693,9 @@ Log all the output from the build process. The output is directed to +stdout+
|
||||
if no log file is provided.
|
||||
+--url url+;;
|
||||
URL to look for source when downloading. This is can be comma separate list.
|
||||
+--no-download+;;
|
||||
Disable downloading of source and patches. If the source is not found an error
|
||||
is raised.
|
||||
+--targetcflags flags+;;
|
||||
List of C flags for the target code. This allows for specific local
|
||||
customisation when testing new variations.
|
||||
|
@ -128,11 +128,13 @@ class build:
|
||||
def get_file(self, url, local):
|
||||
if local is None:
|
||||
raise error.general('source/patch path invalid')
|
||||
if not path.isdir(path.dirname(local)):
|
||||
if not path.isdir(path.dirname(local)) and not self.opts.download_disabled():
|
||||
_notice(self.opts,
|
||||
'Creating source directory: %s' % (os.path.relpath(path.host(path.dirname(local)))))
|
||||
self.mkdir(path.host(path.dirname(local)))
|
||||
if not path.exists(local):
|
||||
if self.opts.download_disabled():
|
||||
raise error.general('source not found: %s' % (path.host(local)))
|
||||
#
|
||||
# Not localy found so we need to download it. Check if a URL has
|
||||
# been provided on the command line.
|
||||
|
@ -41,32 +41,33 @@ class command_line:
|
||||
|
||||
def __init__(self, argv, optargs, _defaults, command_path):
|
||||
self._long_opts = {
|
||||
# key macro handler param defs init
|
||||
'--prefix' : ('_prefix', self._lo_path, True, None, False),
|
||||
'--topdir' : ('_topdir', self._lo_path, True, None, False),
|
||||
'--configdir' : ('_configdir', self._lo_path, True, None, False),
|
||||
'--builddir' : ('_builddir', self._lo_path, True, None, False),
|
||||
'--sourcedir' : ('_sourcedir', self._lo_path, True, None, False),
|
||||
'--tmppath' : ('_tmppath', self._lo_path, True, None, False),
|
||||
'--jobs' : ('_jobs', self._lo_jobs, True, 'max', True),
|
||||
'--log' : ('_logfile', self._lo_string, True, None, False),
|
||||
'--url' : ('_url_base', self._lo_string, True, None, False),
|
||||
'--macros' : ('_macros', self._lo_string, True, None, False),
|
||||
'--targetcflags' : ('_targetcflags', self._lo_string, True, None, False),
|
||||
'--targetcxxflags' : ('_targetcxxflags', self._lo_string, True, None, False),
|
||||
'--libstdcxxflags' : ('_libstdcxxflags', self._lo_string, True, None, False),
|
||||
'--force' : ('_force', self._lo_bool, False, '0', True),
|
||||
'--quiet' : ('_quiet', self._lo_bool, False, '0', True),
|
||||
'--trace' : ('_trace', self._lo_bool, False, '0', True),
|
||||
'--dry-run' : ('_dry_run', self._lo_bool, False, '0', True),
|
||||
'--warn-all' : ('_warn_all', self._lo_bool, False, '0', True),
|
||||
'--no-clean' : ('_no_clean', self._lo_bool, False, '0', True),
|
||||
'--keep-going' : ('_keep_going', self._lo_bool, False, '0', True),
|
||||
'--always-clean' : ('_always_clean', self._lo_bool, False, '0', True),
|
||||
'--host' : ('_host', self._lo_triplets, True, None, False),
|
||||
'--build' : ('_build', self._lo_triplets, True, None, False),
|
||||
'--target' : ('_target', self._lo_triplets, True, None, False),
|
||||
'--help' : (None, self._lo_help, False, None, False)
|
||||
# key macro handler param defs init
|
||||
'--prefix' : ('_prefix', self._lo_path, True, None, False),
|
||||
'--topdir' : ('_topdir', self._lo_path, True, None, False),
|
||||
'--configdir' : ('_configdir', self._lo_path, True, None, False),
|
||||
'--builddir' : ('_builddir', self._lo_path, True, None, False),
|
||||
'--sourcedir' : ('_sourcedir', self._lo_path, True, None, False),
|
||||
'--tmppath' : ('_tmppath', self._lo_path, True, None, False),
|
||||
'--jobs' : ('_jobs', self._lo_jobs, True, 'max', True),
|
||||
'--log' : ('_logfile', self._lo_string, True, None, False),
|
||||
'--url' : ('_url_base', self._lo_string, True, None, False),
|
||||
'--no-download' : ('_disable_download', self._lo_bool, False, '0', True),
|
||||
'--macros' : ('_macros', self._lo_string, True, None, False),
|
||||
'--targetcflags' : ('_targetcflags', self._lo_string, True, None, False),
|
||||
'--targetcxxflags' : ('_targetcxxflags', self._lo_string, True, None, False),
|
||||
'--libstdcxxflags' : ('_libstdcxxflags', self._lo_string, True, None, False),
|
||||
'--force' : ('_force', self._lo_bool, False, '0', True),
|
||||
'--quiet' : ('_quiet', self._lo_bool, False, '0', True),
|
||||
'--trace' : ('_trace', self._lo_bool, False, '0', True),
|
||||
'--dry-run' : ('_dry_run', self._lo_bool, False, '0', True),
|
||||
'--warn-all' : ('_warn_all', self._lo_bool, False, '0', True),
|
||||
'--no-clean' : ('_no_clean', self._lo_bool, False, '0', True),
|
||||
'--keep-going' : ('_keep_going', self._lo_bool, False, '0', True),
|
||||
'--always-clean' : ('_always_clean', self._lo_bool, False, '0', True),
|
||||
'--host' : ('_host', self._lo_triplets, True, None, False),
|
||||
'--build' : ('_build', self._lo_triplets, True, None, False),
|
||||
'--target' : ('_target', self._lo_triplets, True, None, False),
|
||||
'--help' : (None, self._lo_help, False, None, False)
|
||||
}
|
||||
|
||||
self.command_path = command_path
|
||||
@ -200,6 +201,7 @@ class command_line:
|
||||
print '--macros file[,[file] : Macro format files to load after the defaults'
|
||||
print '--log file : Log file where all build out is written too'
|
||||
print '--url url[,url] : URL to look for source'
|
||||
print '--no-download : Disable the source downloader'
|
||||
print '--targetcflags flags : List of C flags for the target code'
|
||||
print '--targetcxxflags flags : List of C++ flags for the target code'
|
||||
print '--libstdcxxflags flags : List of C++ flags to build the target libstdc++ code'
|
||||
@ -390,6 +392,9 @@ class command_line:
|
||||
return self.opts['url'].split(',')
|
||||
return None
|
||||
|
||||
def download_disabled(self):
|
||||
return self.opts['no-download'] != '0'
|
||||
|
||||
def load(args, optargs = None, defaults = '%{_sbdir}/defaults.mc'):
|
||||
"""
|
||||
Copy the defaults, get the host specific values and merge them overriding
|
||||
|
Loading…
x
Reference in New Issue
Block a user