Skip to content

Commit

Permalink
Forward --ccache-maxsize CLI arg to obs-build
Browse files Browse the repository at this point in the history
  • Loading branch information
dcermak committed Dec 18, 2023
1 parent 498a392 commit 99055eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions osc/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,10 @@ def main(apiurl, store, opts, argv):
if opts.ccache or config['ccache']:
buildargs.append('--ccache')
xp.append('ccache')
if opts.ccache_maxsize:
buildargs.append('--ccache')
buildargs.append('--ccache-maxsize=%s' % opts.ccache_maxsize)
xp.append('ccache')

Check warning on line 758 in osc/build.py

View check run for this annotation

Codecov / codecov/patch

osc/build.py#L755-L758

Added lines #L755 - L758 were not covered by tests
if opts.pkg_ccache:
buildargs.append('--pkg-ccache=%s' % opts.pkg_ccache)
xp.append('ccache')
Expand Down
2 changes: 2 additions & 0 deletions osc/commandline.py
Original file line number Diff line number Diff line change
Expand Up @@ -7087,6 +7087,8 @@ def parse_repoarchdescr(self, args, noinit=False, alternative_project=None, igno
help='use N parallel build jobs with icecream')
@cmdln.option('--ccache', action='store_true',
help='use ccache to speed up rebuilds')
@cmdln.option('--ccache-maxsize', metavar='ccache_maxsize',
help='maximum size of the ccache archive')
@cmdln.option('--pkg-ccache', metavar='/path/to/_ccache.tar',
help='path to an existing uncompressed archive ccache. Using this option implies --ccache')
@cmdln.option('--sccache', action='store_true',
Expand Down

0 comments on commit 99055eb

Please sign in to comment.