ccache: Fix for distcc cross-compiling / various improvements (#1026)

* ccache: Fix for distcc cross-compiling / various improvements

* Make ccache work when cross-compiling with distcc (fix #716)
* Allow to configure the ccache size in "pmbootstrap init"
* Moved ccache stats code from pmb/build/other.py to
  pmb/helpers/frontend.py
* Grouped job count, ccache size and timestamp based rebuilds
  together to "build options" and allow to skip them
* Sorted config options that had to be modified anyway
  alphabetically

* Improve comment in arch-bin-masquerade APKBUILD
This commit is contained in:
Oliver Smith 2017-12-21 16:42:29 +00:00 committed by GitHub
parent 071ec4c214
commit 567ac64e26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 213 additions and 96 deletions

View file

@ -154,3 +154,21 @@ def test_questions(args, monkeypatch, tmpdir):
answers = ["/dev/null", os.path.dirname(__file__), pmb.config.pmb_src,
tmpdir]
assert pmb.config.init.ask_for_work_path(args) == tmpdir
#
# BUILD OPTIONS
#
func = pmb.config.init.ask_for_build_options
cfg = {"pmbootstrap": {}}
# Skip changing anything
answers = ["n"]
func(args, cfg)
assert cfg == {"pmbootstrap": {}}
# Answer everything
answers = ["y", "5", "2G", "n"]
func(args, cfg)
assert cfg == {"pmbootstrap": {"jobs": "5",
"ccache_size": "2G",
"timestamp_based_rebuild": "False"}}