pmb.commands package¶
Submodules¶
pmb.commands.apkbuild_parse module¶
- pmb.commands.apkbuild_parse.apkbuild_parse(packages: Sequence[str]) None¶
pmb.commands.aportgen module¶
- pmb.commands.aportgen.aportgen(package_list: list[str], fork_alpine: bool, fork_alpine_retain_branch: bool) None¶
pmb.commands.build module¶
pmb.commands.build_init module¶
pmb.commands.checksum module¶
- pmb.commands.checksum.checksum(packages: Collection[str], do_changed: bool, do_verify: bool) None¶
pmb.commands.ci module¶
- pmb.commands.ci.ci(scripts: str, all: bool, fast: bool) None¶
pmb.commands.config module¶
- pmb.commands.config.config(name: str | None, value: str | None, reset: bool, configpath: Path) None¶
pmb.commands.export module¶
- pmb.commands.export.export(target: Path, autoinstall: bool, odin_flashable_tar: bool) None¶
- pmb.commands.export.odin(device: str, folder: Path) None¶
Create Odin flashable tar file with kernel and initramfs for devices configured with the flasher method ‘heimdall-isorec’ and with boot.img for devices with ‘heimdall-bootimg’
- pmb.commands.export.symlinks(target: Path) None¶
Create convenience symlinks to the rootfs and boot files.
pmb.commands.flasher module¶
- pmb.commands.flasher.flasher(action: str, autoinstall: bool, cmdline: str | None, flash_method: str, no_reboot: bool | None, partition: str | None, resume: bool | None) None¶
pmb.commands.index module¶
- pmb.commands.index.index() None¶
pmb.commands.initfs module¶
- pmb.commands.initfs.initfs(action: str, hook: str | None) None¶
pmb.commands.kconfig module¶
- class pmb.commands.kconfig.KConfigCheck(details: bool, file: str | None, pkgname: str | list[str], keep_going: bool, categories: list[str])¶
Bases:
object- run() None¶
- class pmb.commands.kconfig.KConfigEdit(pkgname: str, arch: Arch | None, use_xconfig: bool, use_nconfig: bool, fragment: str | None = None)¶
Bases:
object- run() None¶
pmb.commands.log module¶
- pmb.commands.log.log(clear_log: bool, lines: int) None¶
pmb.commands.netboot module¶
- pmb.commands.netboot.netboot(action_netboot: str, do_replace: bool) None¶
- pmb.commands.netboot.start_nbd_server(device: str, replace: bool, ip: str = '172.16.42.2', port: int = 9999) None¶
Start nbd server in chroot_native with pmOS rootfs.
- Parameters:
ip – IP address to serve nbd server for
port – port of nbd server
pmb.commands.pkgrel_bump module¶
- pmb.commands.pkgrel_bump.pkgrel_bump(packages: list[str], dry_run: bool, auto: bool) None¶
pmb.commands.pkgver_bump module¶
- pmb.commands.pkgver_bump.pkgver_bump(packages: list[str]) None¶
pmb.commands.pull module¶
- pmb.commands.pull.pull() None¶
pmb.commands.qemu module¶
- pmb.commands.qemu.command_qemu(config: Config, arch: Arch, cmdline_arg: str, qemu_audio: str | None, qemu_cpu: str | None, qemu_display: str, qemu_video: str, memory_size: int, port_ssh: int, use_host_qemu: bool, use_qemu_gl: bool, use_qemu_kvm: bool, use_qemu_tablet: bool, img_path: Path, img_path_2nd: Path | None = None) tuple[list[str | Path], dict[str, Path | str]]¶
Generate the full qemu command with arguments to run postmarketOS
- pmb.commands.qemu.create_gdk_loader_cache() Path¶
Create a gdk loader cache that can be used for running GTK UIs outside of the chroot.
- pmb.commands.qemu.create_second_storage(size: str, device: str) Path¶
Generate a second storage image if it does not exist.
- Returns:
path to the image or None
- pmb.commands.qemu.install_depends(arch: Arch) None¶
Install any necessary qemu dependencies in native chroot
- pmb.commands.qemu.qemu(cmdline_arg: str, qemu_audio: str | None, qemu_cpu: str | None, qemu_display: str, qemu_video: str, memory_size: int, image_size: str | None, second_storage: str | None, port_ssh: int, use_efi: bool, use_host_qemu: bool, use_qemu_gl: bool, use_qemu_kvm: bool, use_qemu_tablet: bool) None¶
Run a postmarketOS image in qemu
- pmb.commands.qemu.resize_image(img_size_new: str, img_path: Path) None¶
Truncates an image to a specific size. The value must be larger than the current image size, and it must be specified in MiB or GiB units (powers of 1024).
- Parameters:
img_size_new – new image size in M or G
img_path – the path to the image
- pmb.commands.qemu.system_image(device: str) Path¶
Returns path to rootfs for specified device. In case that it doesn’t exist, raise and exception explaining how to generate it.
pmb.commands.repo_missing module¶
pmb.commands.shutdown module¶
- pmb.commands.shutdown.shutdown() None¶
pmb.commands.sideload module¶
- pmb.commands.sideload.scp_abuild_key(user: str, host: str, port: str) None¶
Copy the building key of the local installation to the target device, so it trusts the apks that were signed here.
- Parameters:
user – target device ssh username
host – target device ssh hostname
port – target device ssh port
- pmb.commands.sideload.sideload(user: str, host: str, port: str, arch: Arch | None, copy_key: bool, pkgnames: list[str]) None¶
Build packages if necessary and install them via SSH.
- Parameters:
user – target device ssh username
host – target device ssh hostname
port – target device ssh port
arch – target device architecture
copy_key – copy the abuild key too
pkgnames – list of pkgnames to be built
- pmb.commands.sideload.ssh_find_arch(user: str, host: str, port: str) Arch¶
Connect to a device via ssh and query the architecture.
- pmb.commands.sideload.ssh_install_apks(user: str, host: str, port: str, paths: list[Path], install_offline: bool) None¶
Copy binary packages via SCP and install them via SSH.
- Parameters:
user – target device ssh username
host – target device ssh hostname
port – target device ssh port
paths – list of absolute paths to locally stored apks
pmb.commands.stats module¶
pmb.commands.status module¶
- pmb.commands.status.status() NoReturn¶
pmb.commands.test module¶
- pmb.commands.test.apkindex_parse_all() None¶
- pmb.commands.test.test(action: str) None¶
pmb.commands.update module¶
pmb.commands.work_migrate module¶
- pmb.commands.work_migrate.work_migrate() None¶
pmb.commands.zap module¶
- pmb.commands.zap.zap(dry: bool, http: bool, distfiles: bool, pkgs_local: bool, pkgs_local_mismatch: bool, pkgs_online_mismatch: bool, rust: bool, netboot: bool) None¶