1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-02-24 19:22:13 +01:00

fix usage of personality wrappers

This commit is contained in:
Dr. Peter Poeml 2006-07-17 13:53:17 +00:00
parent 686eb637c8
commit c52baf09f7

View File

@ -69,6 +69,7 @@ can_also_build = {
's390x': ['s390'],
}
# real arch of this machine
hostarch = os.uname()[4]
if hostarch == 'i686': # FIXME
hostarch = 'i586'
@ -335,8 +336,15 @@ def main(argv):
tmpl = '%s %s'
cmd = tmpl % (config['su-wrapper'], cmd)
# real arch of this machine
# vs.
# arch we are supposed to build for
if hostarch != bi.buildarch:
cmd = change_personality[bi.buildarch] + ' ' + cmd
# change personality, if needed
if bi.buildarch in can_also_build.get(hostarch, []):
cmd = change_personality[bi.buildarch] + ' ' + cmd
print cmd
os.system(cmd)