1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-28 02:36:15 +01:00

hack to make dependency expansion of --with and --without work for local builds

This commit is contained in:
Ludwig Nussel 2009-11-24 09:49:53 +00:00
parent d47ebed9e0
commit aafcf707fd

View File

@ -370,6 +370,21 @@ def main(opts, argv):
prefer_pkgs = {}
build_descr_data = open(build_descr).read()
# XXX: dirty hack but there's no api to provide custom defines
if opts.without:
s = ''
for i in opts.without:
s += "%%define _without_%s 1\n" % i
s += "%%define _with_%s 0\n" % i
build_descr_data = s + build_descr_data
if opts._with:
s = ''
for i in opts._with:
s += "%%define _without_%s 0\n" % i
s += "%%define _with_%s 1\n" % i
build_descr_data = s + build_descr_data
if opts.prefer_pkgs:
print 'Scanning the following dirs for local packages: %s' % ', '.join(opts.prefer_pkgs)
prefer_pkgs, cpio = get_prefer_pkgs(opts.prefer_pkgs, arch, build_type)