mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-12 23:56:13 +01:00
osc build: moved the architecture check more to the top. Now we first check
whether we can build for the target architecture, *before* we start downloading packges.
This commit is contained in:
parent
d58fffc7b6
commit
f82ea05051
18
osc/build.py
18
osc/build.py
@ -331,6 +331,14 @@ def main(opts, argv):
|
|||||||
|
|
||||||
bi = Buildinfo(bi_file.name, store_read_apiurl(os.curdir))
|
bi = Buildinfo(bi_file.name, store_read_apiurl(os.curdir))
|
||||||
|
|
||||||
|
# real arch of this machine
|
||||||
|
# vs.
|
||||||
|
# arch we are supposed to build for
|
||||||
|
if hostarch != bi.buildarch:
|
||||||
|
if not bi.buildarch in can_also_build.get(hostarch, []):
|
||||||
|
print >>sys.stderr, 'Error: hostarch \'%s\' cannot build \'%s\'.' % (hostarch, bi.buildarch)
|
||||||
|
return 1
|
||||||
|
|
||||||
rpmlist_prefers = []
|
rpmlist_prefers = []
|
||||||
if opts.prefer_pkgs:
|
if opts.prefer_pkgs:
|
||||||
print 'Evaluating preferred packages'
|
print 'Evaluating preferred packages'
|
||||||
@ -407,17 +415,9 @@ def main(opts, argv):
|
|||||||
tmpl = '%s %s'
|
tmpl = '%s %s'
|
||||||
cmd = tmpl % (config['su-wrapper'], cmd)
|
cmd = tmpl % (config['su-wrapper'], cmd)
|
||||||
|
|
||||||
# real arch of this machine
|
|
||||||
# vs.
|
|
||||||
# arch we are supposed to build for
|
|
||||||
if hostarch != bi.buildarch:
|
|
||||||
|
|
||||||
# change personality, if needed
|
# change personality, if needed
|
||||||
if bi.buildarch in can_also_build.get(hostarch, []):
|
if hostarch != bi.buildarch:
|
||||||
cmd = change_personality[bi.buildarch] + ' ' + cmd
|
cmd = change_personality[bi.buildarch] + ' ' + cmd
|
||||||
else:
|
|
||||||
print >>sys.stderr, 'Error: hostarch \'%s\' cannot build \'%s\'.' % (hostarch, bi.buildarch)
|
|
||||||
return 1
|
|
||||||
|
|
||||||
print cmd
|
print cmd
|
||||||
rc = os.system(cmd)
|
rc = os.system(cmd)
|
||||||
|
Loading…
Reference in New Issue
Block a user