diff --git a/osc/build.py b/osc/build.py index 9c622db4..77839f7e 100644 --- a/osc/build.py +++ b/osc/build.py @@ -240,6 +240,7 @@ def main(opts, argv): arch = argv[1] build_descr = argv[2] crossbuild = False + xp = [] build_type = os.path.splitext(build_descr)[1][1:] if build_type not in ['spec', 'dsc', 'kiwi']: @@ -260,10 +261,23 @@ def main(opts, argv): buildargs.append('--changelog') if opts.jobs: buildargs.append('--jobs %s' % opts.jobs) + if opts.icecream: + buildargs.append('--icecream %s' % opts.icecream) + xp.append('icecream') + if opts.ccache: + buildargs.append('--ccache') + xp.append('ccache') if opts.baselibs: buildargs.append('--baselibs') if opts.debuginfo: buildargs.append('--debug') + if opts._with: + buildargs.append('--with %s' % opts._with) + if opts.without: + buildargs.append('--without %s' % opts.without) +# FIXME: quoting +# if opts.define: +# buildargs.append('--define "%s"' % opts.define) if opts.local_package: pac = '_repository' @@ -299,6 +313,10 @@ def main(opts, argv): else: extra_pkgs = opts.extra_pkgs + if xp: + extra_pkgs += xp + + print 'Getting buildinfo from server' bi_file = NamedTemporaryFile(suffix='.xml', prefix='buildinfo.', dir = '/tmp') try: diff --git a/osc/commandline.py b/osc/commandline.py index 308f9d23..ad69a7da 100755 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -1832,6 +1832,17 @@ Please submit there instead, or use --nodevelproject to force direct submission. help='Add this package when installing the build-root') @cmdln.option('-j', '--jobs', metavar='N', help='Compile with N jobs') + @cmdln.option('--icecream', metavar='N', + help='use N parallel build jobs with icecream') + @cmdln.option('--ccache', action='store_true', + help='use ccache to speed up rebuilds') + @cmdln.option('--with', metavar='X', dest='_with', + help='enable feature X for build') + @cmdln.option('--without', metavar='X', + help='disable feature X for build') +# will not work as build.py does not support proper quoting +# @cmdln.option('--define', metavar='\'X Y\'', +# help='define macro X with value Y') @cmdln.option('--userootforbuild', action='store_true', help='Run build as root. The default is to build as ' 'unprivileged user. Note that a line "# norootforbuild" '