{image,packages}.cmd_build(): document the HTTPS download behaviour
and minor cleanups for cli params
This commit is contained in:
parent
5003225409
commit
97c1bd1f74
2 changed files with 11 additions and 4 deletions
8
image.py
8
image.py
|
@ -369,7 +369,7 @@ def cmd_image():
|
|||
is_flag=True,
|
||||
default=False,
|
||||
help='Disable trying to download packages instead of building if building is enabled.')
|
||||
@click.option('--block-target', default=None, help='Override the block device file to write the final image to')
|
||||
@click.option('--block-target', type=click.Path(), default=None, help='Override the block device file to write the final image to')
|
||||
@click.option('--skip-part-images',
|
||||
is_flag=True,
|
||||
default=False,
|
||||
|
@ -380,7 +380,11 @@ def cmd_build(profile_name: str = None,
|
|||
no_download_pkgs=False,
|
||||
block_target: str = None,
|
||||
skip_part_images: bool = False):
|
||||
"""Build a device image"""
|
||||
"""
|
||||
Build a device image.
|
||||
|
||||
Unless overriden, required packages will be built or preferably downloaded from HTTPS repos.
|
||||
"""
|
||||
enforce_wrap()
|
||||
profile: Profile = config.get_profile(profile_name)
|
||||
device, flavour = get_device_and_flavour(profile_name)
|
||||
|
|
|
@ -735,17 +735,20 @@ def cmd_update(non_interactive: bool = False):
|
|||
|
||||
@cmd_packages.command(name='build')
|
||||
@click.option('--force', is_flag=True, default=False, help='Rebuild even if package is already built')
|
||||
@click.option('--arch', default=None, help="The CPU architecture to build for")
|
||||
@click.option('--arch', default=None, required=False, type=click.Choice(ARCHES), help="The CPU architecture to build for")
|
||||
@click.option('--rebuild-dependants', is_flag=True, default=False, help='Rebuild packages that depend on packages that will be [re]built')
|
||||
@click.option('--no-download', is_flag=True, default=False, help="Don't try downloading packages from online repos before building")
|
||||
@click.argument('paths', nargs=-1)
|
||||
def cmd_build(paths: list[str], force=False, arch=None, rebuild_dependants: bool = False, no_download: bool = False):
|
||||
"""
|
||||
Build packages by paths.
|
||||
Build packages (and dependencies) by paths as required.
|
||||
|
||||
The paths are specified relative to the PKGBUILDs dir, eg. "cross/crossdirect".
|
||||
|
||||
Multiple paths may be specified as separate arguments.
|
||||
|
||||
Packages that aren't built already will be downloaded from HTTPS repos unless --no-download is passed,
|
||||
if an exact version match exists on the server.
|
||||
"""
|
||||
build(paths, force, arch, rebuild_dependants, not no_download)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue