forked from Mirror/pmbootstrap
treewide: remove rogue leading slashes (MR 2252)
One flaw of pathlib is that Path("/tmp/") / "/some/relative/path" results in Path("/some/relative/path").... Fix the places in the codebase where we get this wrong. Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
parent
9fff9033f2
commit
099bd2f4fa
3 changed files with 4 additions and 4 deletions
|
@ -137,7 +137,7 @@ def mount(chroot: Chroot):
|
||||||
|
|
||||||
# mount --bind the qemu-user binary
|
# mount --bind the qemu-user binary
|
||||||
pmb.chroot.binfmt.register(arch)
|
pmb.chroot.binfmt.register(arch)
|
||||||
pmb.helpers.mount.bind_file(Chroot.native() / f"/usr/bin/qemu-{arch_qemu}",
|
pmb.helpers.mount.bind_file(Chroot.native() / f"usr/bin/qemu-{arch_qemu}",
|
||||||
chroot / f"usr/bin/qemu-{arch_qemu}-static",
|
chroot / f"usr/bin/qemu-{arch_qemu}-static",
|
||||||
create_folders=True)
|
create_folders=True)
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,7 @@ def sideload(deviceinfo: Deviceinfo, method: str):
|
||||||
Chroot.native().path / mountpoint)
|
Chroot.native().path / mountpoint)
|
||||||
|
|
||||||
# Missing recovery zip error
|
# Missing recovery zip error
|
||||||
if not (Chroot.native() / mountpoint / "/var/lib/postmarketos-android-recovery-installer"
|
if not (Chroot.native() / mountpoint / "var/lib/postmarketos-android-recovery-installer"
|
||||||
/ f"pmos-{deviceinfo.codename}.zip").exists():
|
/ f"pmos-{deviceinfo.codename}.zip").exists():
|
||||||
raise RuntimeError("The recovery zip has not been generated yet,"
|
raise RuntimeError("The recovery zip has not been generated yet,"
|
||||||
" please run 'pmbootstrap install' with the"
|
" please run 'pmbootstrap install' with the"
|
||||||
|
|
|
@ -123,7 +123,7 @@ def copy_files_from_chroot(args: PmbArgs, chroot: Chroot):
|
||||||
|
|
||||||
# Remove empty qemu-user binary stub (where the binary was bind-mounted)
|
# Remove empty qemu-user binary stub (where the binary was bind-mounted)
|
||||||
arch_qemu = pmb.parse.deviceinfo().arch.qemu()
|
arch_qemu = pmb.parse.deviceinfo().arch.qemu()
|
||||||
qemu_binary = mountpoint_outside / ("/usr/bin/qemu-" + arch_qemu + "-static")
|
qemu_binary = mountpoint_outside / f"usr/bin/qemu-{arch_qemu}-static"
|
||||||
if os.path.exists(qemu_binary):
|
if os.path.exists(qemu_binary):
|
||||||
pmb.helpers.run.root(["rm", qemu_binary])
|
pmb.helpers.run.root(["rm", qemu_binary])
|
||||||
|
|
||||||
|
@ -973,7 +973,7 @@ def print_flash_info(device: str, deviceinfo: Deviceinfo, split: bool, have_disk
|
||||||
" Use 'pmbootstrap flasher boot' to do that.)")
|
" Use 'pmbootstrap flasher boot' to do that.)")
|
||||||
|
|
||||||
if "flash_lk2nd" in flasher_actions and \
|
if "flash_lk2nd" in flasher_actions and \
|
||||||
(Chroot(ChrootType.ROOTFS, device) / "/boot/lk2nd.img").exists():
|
(Chroot(ChrootType.ROOTFS, device) / "boot/lk2nd.img").exists():
|
||||||
logging.info("* Your device supports and may even require"
|
logging.info("* Your device supports and may even require"
|
||||||
" flashing lk2nd. You should flash it before"
|
" flashing lk2nd. You should flash it before"
|
||||||
" flashing anything else. Use 'pmbootstrap flasher"
|
" flashing anything else. Use 'pmbootstrap flasher"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue