diff --git a/pmb/config/__init__.py b/pmb/config/__init__.py index 81e8ee1e..199a129a 100644 --- a/pmb/config/__init__.py +++ b/pmb/config/__init__.py @@ -16,6 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with pmbootstrap. If not, see . """ +import multiprocessing import os # @@ -47,6 +48,7 @@ defaults = { "config": os.path.expanduser("~") + "/.config/pmbootstrap.cfg", "device": "samsung-i9100", "extra_packages": "none", + "jobs": str(multiprocessing.cpu_count() + 1), "timestamp_based_rebuild": True, "log": "$WORK/log.txt", "mirror_alpine": "https://nl.alpinelinux.org/alpine/", diff --git a/pmb/config/init.py b/pmb/config/init.py index 0b9690b0..7140eb54 100644 --- a/pmb/config/init.py +++ b/pmb/config/init.py @@ -18,7 +18,6 @@ along with pmbootstrap. If not, see . """ import logging import os -import multiprocessing import pmb.config import pmb.helpers.cli @@ -76,13 +75,10 @@ def init(args): cfg["pmbootstrap"]["work"] = ask_for_work_path(args) # Parallel job count - default = args.jobs - if not default: - default = multiprocessing.cpu_count() + 1 logging.info("How many jobs should run parallel on this machine, when" " compiling?") cfg["pmbootstrap"]["jobs"] = pmb.helpers.cli.ask(args, "Jobs", - None, default, validation_regex="[1-9][0-9]*") + None, args.jobs, validation_regex="[1-9][0-9]*") # Timestamp based rebuilds logging.info("Rebuild packages, when the last modified timestamp changed," diff --git a/pmb/helpers/ui.py b/pmb/helpers/ui.py index 31856420..12e77726 100644 --- a/pmb/helpers/ui.py +++ b/pmb/helpers/ui.py @@ -23,7 +23,7 @@ import glob def list(args): """ Get all UIs, for which aports are available - :returns: ["none", "postmarketos-ui-one", "psotmarketos-ui-two", ...] + :returns: ["postmarketos-ui-one", "postmarketos-ui-two", ..., "none"] """ ret = [] for path in glob.glob(args.aports + "/main/postmarketos-ui-*"):