From bdb0c8033c7d83c01921a9d3226319116be06310 Mon Sep 17 00:00:00 2001 From: William Brown Date: Tue, 14 Apr 2020 14:50:24 +1000 Subject: [PATCH] Add ccache argument for oscrc --- osc/build.py | 2 +- osc/conf.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/osc/build.py b/osc/build.py index f6f4a085..4f6eeb93 100644 --- a/osc/build.py +++ b/osc/build.py @@ -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: diff --git a/osc/conf.py b/osc/conf.py index 1a223e2e..d0cf6869 100644 --- a/osc/conf.py +++ b/osc/conf.py @@ -119,6 +119,7 @@ DEFAULTS = {'apiurl': 'https://api.opensuse.org', '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 @@ -200,7 +201,7 @@ boolean_opts = ['debug', 'do_package_tracking', 'http_debug', 'post_mortem', 'tr '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'] @@ -277,6 +278,9 @@ apiurl = %(apiurl)s # 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