Skip to content

Commit

Permalink
Merge branch '776-ccache' of https://github.com/Firstyear/osc
Browse files Browse the repository at this point in the history
Add ccache option to the oscrc (default: disabled). If enabled, the
--ccache option is always passed to the build script (if invoked via
osc.build.main).
  • Loading branch information
marcus-h committed Apr 15, 2020
2 parents 01d235d + bdb0c80 commit c156815
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion osc/build.py
Expand Up @@ -619,7 +619,7 @@ def main(apiurl, opts, argv):
buildargs.append('--icecream=%s' % num)
xp.append('icecream')
xp.append('gcc-c++')
if opts.ccache:
if opts.ccache or config['ccache']:
buildargs.append('--ccache')
xp.append('ccache')
if opts.linksources:
Expand Down
6 changes: 5 additions & 1 deletion osc/conf.py
Expand Up @@ -119,6 +119,7 @@ def _get_processors():
'build-jobs': str(_get_processors()),
'builtin_signature_check': '1', # by default use builtin check for verify pkgs
'icecream': '0',
'ccache': '0',

'buildlog_strip_time': '0', # strips the build time from the build log

Expand Down Expand Up @@ -200,7 +201,7 @@ def _get_processors():
'checkout_no_colon', 'checkout_rooted', 'check_for_request_on_action', 'linkcontrol', 'show_download_progress', 'request_show_interactive',
'request_show_source_buildstatus', 'review_inherit_group', 'use_keyring', 'gnome_keyring', 'no_verify', 'builtin_signature_check',
'http_full_debug', 'include_request_from_project', 'local_service_run', 'buildlog_strip_time', 'no_preinstallimage',
'status_mtime_heuristic', 'print_web_links']
'status_mtime_heuristic', 'print_web_links', 'ccache']
integer_opts = ['build-jobs']

api_host_options = ['user', 'pass', 'passx', 'aliases', 'http_headers', 'realname', 'email', 'sslcertck', 'cafile', 'capath', 'trusted_prj']
Expand Down Expand Up @@ -277,6 +278,9 @@ def _get_processors():
# strip leading build time information from the build log
# buildlog_strip_time = 1
# Enable ccache in build roots.
# ccache = 1
# extra packages to install when building packages locally (osc build)
# this corresponds to osc build's -x option and can be overridden with that
# -x '' can also be given on the command line to override this setting, or
Expand Down

0 comments on commit c156815

Please sign in to comment.