forked from Mirror/pmbootstrap
pmb.config.init: fix perf regression when selecting "none" UI (MR 1913)
The ui-extras questions will attempt to find a postmarketos-ui-<ui> package in pmaports. If the package does not exist as "root" APKBUILD it currently attempts to parse all APKBUILDs in case it is somewhere defined as a subpackage. This is really slow (up to 2-3 seconds), which feels weird during "pmbootstrap init". For the UI packages we specifically look for the root UI package, not the subpackage, so let's skip searching for subpackages in this case. This makes selecting the "none" UI nice and fast again.
This commit is contained in:
parent
87f81de052
commit
add39d1a57
2 changed files with 16 additions and 5 deletions
|
@ -90,7 +90,8 @@ def ask_for_ui(args):
|
|||
|
||||
|
||||
def ask_for_ui_extras(args, ui):
|
||||
apkbuild = pmb.helpers.pmaports.get(args, "postmarketos-ui-" + ui, must_exist=False)
|
||||
apkbuild = pmb.helpers.pmaports.get(args, "postmarketos-ui-" + ui,
|
||||
subpackages=False, must_exist=False)
|
||||
if not apkbuild:
|
||||
return False
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue