mirror of
https://gitlab.com/kupfer/kupferbootstrap.git
synced 2025-02-23 05:35:44 -05:00
packages/cli: clean up wrapping
This commit is contained in:
parent
91041ab06d
commit
4320c28c1b
1 changed files with 4 additions and 1 deletions
|
@ -27,11 +27,12 @@ def build(
|
||||||
rebuild_dependants: bool = False,
|
rebuild_dependants: bool = False,
|
||||||
try_download: bool = False,
|
try_download: bool = False,
|
||||||
):
|
):
|
||||||
|
config.enforce_profile_device_set(hint_or_set_arch=True)
|
||||||
|
enforce_wrap()
|
||||||
arch = arch or get_profile_device(hint_or_set_arch=True).arch
|
arch = arch or get_profile_device(hint_or_set_arch=True).arch
|
||||||
|
|
||||||
if arch not in ARCHES:
|
if arch not in ARCHES:
|
||||||
raise Exception(f'Unknown architecture "{arch}". Choices: {", ".join(ARCHES)}')
|
raise Exception(f'Unknown architecture "{arch}". Choices: {", ".join(ARCHES)}')
|
||||||
config.enforce_config_loaded()
|
|
||||||
|
|
||||||
return build_packages_by_paths(
|
return build_packages_by_paths(
|
||||||
paths,
|
paths,
|
||||||
|
@ -170,6 +171,7 @@ def cmd_clean(what: Iterable[str] = ['all'], force: bool = False, noop: bool = F
|
||||||
def cmd_list():
|
def cmd_list():
|
||||||
"List information about available source packages (PKGBUILDs)"
|
"List information about available source packages (PKGBUILDs)"
|
||||||
logging.info('Discovering packages.')
|
logging.info('Discovering packages.')
|
||||||
|
check_programs_wrap(['makepkg', 'pacman'])
|
||||||
packages = discover_pkgbuilds()
|
packages = discover_pkgbuilds()
|
||||||
logging.info(f'Done! {len(packages)} Pkgbuilds:')
|
logging.info(f'Done! {len(packages)} Pkgbuilds:')
|
||||||
for p in set(packages.values()):
|
for p in set(packages.values()):
|
||||||
|
@ -182,6 +184,7 @@ def cmd_list():
|
||||||
@click.argument('paths', nargs=-1)
|
@click.argument('paths', nargs=-1)
|
||||||
def cmd_check(paths):
|
def cmd_check(paths):
|
||||||
"""Check that specified PKGBUILDs are formatted correctly"""
|
"""Check that specified PKGBUILDs are formatted correctly"""
|
||||||
|
check_programs_wrap(['makepkg'])
|
||||||
|
|
||||||
def check_quoteworthy(s: str) -> bool:
|
def check_quoteworthy(s: str) -> bool:
|
||||||
quoteworthy = ['"', "'", "$", " ", ";", "&", "<", ">", "*", "?"]
|
quoteworthy = ['"', "'", "$", " ", ";", "&", "<", ">", "*", "?"]
|
||||||
|
|
Loading…
Add table
Reference in a new issue