Commit graph

691 commits

Author SHA1 Message Date
InsanePrawn
5c8f0acfcd exec: run_cmd() include cwd in debug log 2022-11-09 20:19:04 +01:00
InsanePrawn
f535344351 utils.git(): default cwd to None instead of "." 2022-11-09 20:19:04 +01:00
InsanePrawn
686a62685e packages: parse_pkgbuild(): banish SRCINFO caching into new file srcinfo_cache.py 2022-11-09 20:19:04 +01:00
InsanePrawn
2f8d53648e packages: discover_pkgbuilds: caching fixes and cleanups 2022-11-09 20:19:04 +01:00
InsanePrawn
73dc5a287a packages: discover_pkgbuilds: use threading as backend for Parallel instead of loky for speed
benchmark: `time kupferbootstrap -vW packages list`

uncached srcinfos:
- threading: ~83s
- multiprocessing: ~86s
- loky: ~144s (~2x)

cached srcinfos:
- threading: ~0.6s
- multiprocessing: ~0.8s
- loky: ~50s (~100x)
2022-11-09 20:19:04 +01:00
InsanePrawn
3b8242be19 packages: parse_pkgbuilds: cache makepkg --printsrcinfo output to SRCINFO, tie to PKGBUILD checksum in srcinfo_meta.json 2022-11-09 20:19:04 +01:00
InsanePrawn
b31160146b utils.py: add sha256sum(filepath) 2022-11-09 20:19:04 +01:00
InsanePrawn
f77aa4f2a2 config: add listings of devices and flavours to config profile init aka prompt_profile() and --no-parse flag
This is slow-ish without SRCINFO caching
2022-11-09 20:19:04 +01:00
InsanePrawn
7b7caf3f37 dataclass: DataClass.tranform(): handle Optional dict/Munch items 2022-11-09 20:19:04 +01:00
InsanePrawn
adcdf38c14 packages: add flavour.py: initial implementation for Flavour scanning 2022-11-09 20:19:04 +01:00
InsanePrawn
6f9a013c2e packages: add cmd_devices_list() 2022-11-09 20:19:04 +01:00
InsanePrawn
75c832cbfb packages: get_devices(): use lazy scanning, scan only device repository 2022-11-09 20:19:04 +01:00
InsanePrawn
ddc92012b8 packages: discover_pkgbuilds(): introduce ability for partial scanning by limiting repositories 2022-11-09 20:19:04 +01:00
InsanePrawn
2a20f6c45a config: add Config.enforce_profile_flavour_set() 2022-11-09 20:19:04 +01:00
InsanePrawn
d3cdd64aea packages: improve ux around cli and filter_pkgbuilds() to indicate that the query was empty or wrong 2022-11-09 20:19:04 +01:00
InsanePrawn
bca1e29648 packages/pkgbuild: add pkgdesc description parsing 2022-11-09 20:19:04 +01:00
InsanePrawn
1fd84bb9c2 packages/pkgbuild: add get_pkgbuild_by_name(name, lazy=True) for easy cache access 2022-11-09 20:19:04 +01:00
InsanePrawn
e4320578ef packages: init_pkgbuilds(): add lazy param and behaviour 2022-11-09 20:19:04 +01:00
InsanePrawn
69404a4267 packages/build: check_package_built(): add init_prebuilts(arch) 2022-11-09 20:19:04 +01:00
InsanePrawn
7d803fc5bd config: Config.update(): avoid Munch attr error by calling .toDict() on self.file before comparison with merged 2022-11-09 20:19:04 +01:00
InsanePrawn
dd0d848b8f image.cmd_build(): parse deviceinfo only after building the packages 2022-11-09 20:19:04 +01:00
InsanePrawn
98140565ef packages: parse_pkgbuild(): handle split packages properly 2022-11-09 20:19:04 +01:00
InsanePrawn
ad966d6616 chroot.cmd_chroot(): call image.cmd_inspect() for type='rootfs' and clean up 2022-11-09 20:19:04 +01:00
InsanePrawn
1d0a97560b chroot.mount_pacman_cache(): use /var/cache/pacman/pkg to avoid problems while pacstrapping, adjust pacman.conf generator 2022-11-09 20:19:04 +01:00
InsanePrawn
6c269080d6 constants.py: clean up paths 2022-11-09 20:19:04 +01:00
InsanePrawn
eea8b964e0 boot: use get_profile_device.flash_pagesize for sector_size 2022-11-09 20:19:04 +01:00
InsanePrawn
69bed9fc4e readme: point to online kupfer docs, use full config init instead of non-interactive 2022-11-09 20:19:04 +01:00
InsanePrawn
b80f42d48a packages: get_makepkg_env(): don't use host env, but provide standard PATH variable 2022-11-09 20:19:04 +01:00
InsanePrawn
c3e4b5c108 packages/device: get_device: check if device pkgbuild dir exists upfront and raise clear exception if not instead of asserting 2022-11-09 20:11:20 +01:00
InsanePrawn
ad83d14861 config.enforce_profile_device_set(): default profile_name from profiles.current to output in error msgs if "None" passed 2022-11-09 20:11:20 +01:00
InsanePrawn
927fa352c5 image,flash: get sector size from deviceinfo 2022-11-09 20:11:20 +01:00
InsanePrawn
4f7cb8f516 packages/device: implement Device.parse_deviceinfo(), add deviceinfo tests 2022-11-09 20:11:20 +01:00
InsanePrawn
2c70ad6c12 utils: add read_files_from_tar() 2022-11-09 20:11:20 +01:00
InsanePrawn
81f88dd636 packages: clean up check_package_built() and use RemotePackage.acquire() in try_download_package() 2022-11-09 20:11:20 +01:00
InsanePrawn
a9edbfd07d exec/file: document symlink() and check return code 2022-11-09 20:11:19 +01:00
InsanePrawn
4154b2dfe3 distro.package: add Package.acquire() 2022-11-09 20:11:19 +01:00
InsanePrawn
a2c8868d61 packages/build: add_file_to_repo(): add remove_original=True parameter, clean up add_package_to_repo() 2022-11-09 20:11:19 +01:00
InsanePrawn
57fec8fd91 packages/build: split out init_local_repo() from init_prebuilts(), use in add_file_to_repo() 2022-11-09 20:11:19 +01:00
InsanePrawn
bf420a73be distro: refactor BinaryPackage, Repo and Distro into generics for Local and Remote 2022-11-09 20:11:19 +01:00
InsanePrawn
dbe3dc91a3 distro/package: refactor class PackageInfo into class BinaryPackage(PackageInfo) 2022-11-09 19:39:59 +01:00
InsanePrawn
daa7b68738 packages: split up __init__.py into build.py and cli.py 2022-11-09 19:39:59 +01:00
InsanePrawn
c16147ef0c distro.package.parse_desc(): rename resolved_url param to resolved_repo_url for clarity 2022-11-09 19:39:59 +01:00
InsanePrawn
072ce8e4f0 wrapper/docker: create volume dirs ourselfes for better permissions and podman compat 2022-11-09 19:39:59 +01:00
InsanePrawn
69036d008b wrapper/docker: fix indentation (only version needs to be pulled from with open():) 2022-11-09 19:39:59 +01:00
InsanePrawn
040e409620 dataclass.resolve_type_hint(): add conversion from str to [int,float] if str not in types 2022-11-09 19:39:59 +01:00
InsanePrawn
2cd41e75ca config/scheme: move DataClass to dataclass.py 2022-11-09 19:39:59 +01:00
InsanePrawn
76b5b26157 config: DataClass.transform(): add allow_extra=False parameter 2022-11-09 19:39:59 +01:00
InsanePrawn
d7f61f6475 packages: move filter_packages() to pkgbuild, rename to filter_pkgbuilds() 2022-11-09 19:39:59 +01:00
InsanePrawn
003cb7979e constants.py: remove DEVICES array, now comes from pkgbuilds.git 2022-11-09 19:39:59 +01:00
InsanePrawn
5a565662eb image.py: use Device instead of the device name from config 2022-11-09 19:39:59 +01:00