diff --git a/build b/build index 1d42d8c..9954590 100755 --- a/build +++ b/build @@ -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. diff --git a/common.py b/common.py index e260e85..de61efc 100644 --- a/common.py +++ b/common.py @@ -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