build: log warning on git too old for --update

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-05-14 00:00:07 +00:00
parent 9b6fbb7242
commit 684bc6b908
2 changed files with 8 additions and 0 deletions

4
build
View File

@@ -556,6 +556,10 @@ Which components to build. Default: qemu-buildroot
# * https://stackoverflow.com/questions/2155887/git-submodule-head-reference-is-not-a-tree-error/25875273#25875273
# * https://github.com/boostorg/boost/issues/245
cmd.extend(['--depth', '1', LF])
else:
self.log_warn('your git is too old for git submodule update --depth 1')
self.log_warn('update to git 2.17 or newer and you will save clone time')
self.log_warn('see: https://github.com/cirosantilli/linux-kernel-module-cheat/issues/44')
self.sh.run_cmd(cmd + ['--', LF] + submodule_ids_to_cmd(submodules_shallow))
# Do the build.

View File

@@ -1117,6 +1117,10 @@ lunch aosp_{}-eng
if flush:
sys.stdout.flush()
def log_warn(self, msg):
with self.print_lock:
print('warning: {}'.format(msg), file=sys.stdout)
def is_subpath(self, subpath, parent):
'''
https://stackoverflow.com/questions/3812849/how-to-check-whether-a-directory-is-a-sub-directory-of-another-directory