diff --git a/osc/build.py b/osc/build.py index b20ef3f4..14d54564 100644 --- a/osc/build.py +++ b/osc/build.py @@ -621,6 +621,9 @@ def main(apiurl, opts, argv): if opts.ccache or config['ccache']: buildargs.append('--ccache') xp.append('ccache') + if opts.pkg_ccache: + buildargs.append('--pkg-ccache=%s' % opts.pkg_ccache) + xp.append('ccache') if opts.linksources: buildargs.append('--linksources') if opts.baselibs: diff --git a/osc/commandline.py b/osc/commandline.py index 0ad5b94a..782d2308 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -6324,6 +6324,8 @@ Please submit there instead, or use --nodevelproject to force direct submission. help='use N parallel build jobs with icecream') @cmdln.option('--ccache', action='store_true', help='use ccache to speed up rebuilds') + @cmdln.option('--pkg-ccache', metavar='/path/to/_ccache.tar', + help='path to an existing uncompressed archive ccache. Using this option implies --ccache') @cmdln.option('--with', metavar='X', dest='_with', action='append', help='enable feature X for build') @cmdln.option('--without', metavar='X', action='append',