|
|
|
@ -1646,8 +1646,13 @@ class Builder(Update):
|
|
|
|
|
vmlinuz = path.join(boot_dn, vmlinuz)
|
|
|
|
|
initrd = path.join(boot_dn, initrd)
|
|
|
|
|
try:
|
|
|
|
|
open(vmlinuz, 'w').write(open(vmlinuz_orig, 'rb').read())
|
|
|
|
|
open(initrd, 'w').write(open(initrd_orig, 'rb').read())
|
|
|
|
|
with open(vmlinuz_orig, 'rb') as r_fd:
|
|
|
|
|
with open(vmlinuz, 'w') as w_fd:
|
|
|
|
|
w_fd.write(r_fd.read())
|
|
|
|
|
|
|
|
|
|
with open(initrd_orig, 'rb') as r_fd:
|
|
|
|
|
with open(initrd, 'w') as w_fd:
|
|
|
|
|
w_fd.write(r_fd.read())
|
|
|
|
|
except (IOError, OSError) as e:
|
|
|
|
|
self.printERROR(str(e))
|
|
|
|
|
raise BuilderError(_("Failed to extract kernel from %s")
|
|
|
|
|