Minor fixes (#316)

* Fixed typo and specify list order

* Simplify code for jobs default value
This commit is contained in:
Pablo Castellano 2017-08-06 14:50:38 +02:00 committed by Oliver Smith
parent 5eb9b92e7b
commit b41e75e662
3 changed files with 4 additions and 6 deletions

View File

@ -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/",

View File

@ -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,"

View File

@ -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-*"):