Skip to content
Snippets Groups Projects
Unverified Commit 0478c30e authored by Oliver Smith's avatar Oliver Smith
Browse files

install: fix --no-local-pkgs

As chroot.glob() now returns a generator, convert it to a list first to
check if it is empty. This may not be the most efficient method, but
since we expect it to be empty here it is fine.

Without this patch, it always shows the error even if there are no
locally built packages:

  ERROR: --no-local-pkgs specified, but locally built packages found. Consider 'pmbootstrap zap -p' to delete them.
parent 9cec60e0
No related branches found
No related tags found
No related merge requests found
......@@ -396,7 +396,7 @@ def install(args: PmbArgs) -> None:
config.build_pkgs_on_install = False
# Safest way to avoid installing local packages is having none
if (config.work / "packages").glob("*"):
if list((config.work / "packages").glob("*")):
raise ValueError(
"--no-local-pkgs specified, but locally built"
" packages found. Consider 'pmbootstrap zap -p'"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment