diff --git a/pmb/build/autodetect.py b/pmb/build/autodetect.py index 33ac0426..a93919ab 100644 --- a/pmb/build/autodetect.py +++ b/pmb/build/autodetect.py @@ -94,7 +94,7 @@ def crosscompile(args: PmbArgs, apkbuild, arch, suffix: Chroot): return None if not pmb.parse.arch.cpu_emulation_required(arch): return None - if suffix.type() == ChrootType.NATIVE: + if suffix.type == ChrootType.NATIVE: return "native" if "!pmb:crossdirect" in apkbuild["options"]: return None diff --git a/pmb/chroot/init.py b/pmb/chroot/init.py index 683261f3..d502a4b9 100644 --- a/pmb/chroot/init.py +++ b/pmb/chroot/init.py @@ -167,7 +167,7 @@ def init(args: PmbArgs, chroot: Chroot=Chroot.native(), usr_merge=UsrMerge.AUTO, "add", "alpine-base"]) # Building chroots: create "pmos" user, add symlinks to /home/pmos - if not chroot.type() == ChrootType.ROOTFS: + if not chroot.type == ChrootType.ROOTFS: pmb.chroot.root(args, ["adduser", "-D", "pmos", "-u", pmb.config.chroot_uid_user], chroot, auto_init=False) diff --git a/pmb/helpers/frontend.py b/pmb/helpers/frontend.py index 9e6f992e..e486e423 100644 --- a/pmb/helpers/frontend.py +++ b/pmb/helpers/frontend.py @@ -161,7 +161,7 @@ def chroot(args: PmbArgs): # Suffix suffix = _parse_suffix(args) if (args.user and suffix != Chroot.native() and - not suffix.type() == ChrootType.BUILDROOT): + not suffix.type == ChrootType.BUILDROOT): raise RuntimeError("--user is only supported for native or" " buildroot_* chroots.") if args.xauth and suffix != Chroot.native(): diff --git a/pmb/parse/arch.py b/pmb/parse/arch.py index f16fe3f8..37c2b022 100644 --- a/pmb/parse/arch.py +++ b/pmb/parse/arch.py @@ -19,7 +19,7 @@ def from_chroot_suffix(args: PmbArgs, chroot: Chroot) -> str: return pmb.config.arch_native if chroot.name() == args.device: return args.deviceinfo["arch"] - if chroot.type() == ChrootType.BUILDROOT: + if chroot.type == ChrootType.BUILDROOT: return chroot.name() raise ValueError(f"Invalid chroot suffix: {chroot}"