Skip to content
Snippets Groups Projects
Commit b41e75e6 authored by Pablo Castellano's avatar Pablo Castellano Committed by Oliver Smith
Browse files

Minor fixes (#316)

* Fixed typo and specify list order

* Simplify code for jobs default value
parent 5eb9b92e
Branches
Tags
No related merge requests found
......@@ -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 <http://www.gnu.org/licenses/>.
"""
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/",
......
......@@ -18,7 +18,6 @@ along with pmbootstrap. If not, see <http://www.gnu.org/licenses/>.
"""
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,"
......
......@@ -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-*"):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment