forked from Mirror/pmbootstrap
Fix "pmbootstrap build_init" (MR 2386)
Do not fail with: ERROR: 'Namespace' object has no attribute 'image' Adjust the similar check for args.rootfs to be in the same style while at it.
This commit is contained in:
parent
86d38d451b
commit
ae4094c1db
1 changed files with 2 additions and 2 deletions
|
@ -65,10 +65,10 @@ def _parse_flavor(device: str, autoinstall=True):
|
||||||
|
|
||||||
def _parse_suffix(args: PmbArgs) -> Chroot:
|
def _parse_suffix(args: PmbArgs) -> Chroot:
|
||||||
deviceinfo = pmb.parse.deviceinfo()
|
deviceinfo = pmb.parse.deviceinfo()
|
||||||
if args.image:
|
if getattr(args, "image", None):
|
||||||
rootfs = Chroot.native() / f"home/pmos/rootfs/{deviceinfo.codename}.img"
|
rootfs = Chroot.native() / f"home/pmos/rootfs/{deviceinfo.codename}.img"
|
||||||
return Chroot(ChrootType.IMAGE, str(rootfs))
|
return Chroot(ChrootType.IMAGE, str(rootfs))
|
||||||
if "rootfs" in args and args.rootfs:
|
if getattr(args, "rootfs", None):
|
||||||
return Chroot(ChrootType.ROOTFS, get_context().config.device)
|
return Chroot(ChrootType.ROOTFS, get_context().config.device)
|
||||||
elif args.buildroot:
|
elif args.buildroot:
|
||||||
if args.buildroot == "device":
|
if args.buildroot == "device":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue