pmb.install: remove qemu-user binary stub from device rootfs (!1861)
Now that the qemu-user binary is bind-mounted, we no longer copy the binary to the device rootfs. However, there is still the empty stub file that we used as a destination mount point. Let's remove it before copying it to the device rootfs. It is automatically re-created the next time the qemu-user binary is needed.
This commit is contained in:
parent
d0376ee0fb
commit
44e887f11e
|
@ -127,6 +127,12 @@ def copy_files_from_chroot(args):
|
||||||
mountpoint = mount_device_rootfs(args)
|
mountpoint = mount_device_rootfs(args)
|
||||||
mountpoint_outside = args.work + "/chroot_native" + mountpoint
|
mountpoint_outside = args.work + "/chroot_native" + mountpoint
|
||||||
|
|
||||||
|
# Remove empty qemu-user binary stub (where the binary was bind-mounted)
|
||||||
|
arch_qemu = pmb.parse.arch.alpine_to_qemu(args.deviceinfo["arch"])
|
||||||
|
qemu_binary = mountpoint_outside + "/usr/bin/qemu-" + arch_qemu + "-static"
|
||||||
|
if os.path.exists(qemu_binary):
|
||||||
|
pmb.helpers.run.root(args, ["rm", qemu_binary])
|
||||||
|
|
||||||
# Get all folders inside the device rootfs (except for home)
|
# Get all folders inside the device rootfs (except for home)
|
||||||
folders = []
|
folders = []
|
||||||
for path in glob.glob(mountpoint_outside + "/*"):
|
for path in glob.glob(mountpoint_outside + "/*"):
|
||||||
|
|
Loading…
Reference in New Issue