diff --git a/hw/deps/valentyusb b/hw/deps/valentyusb index f470661..8151e2b 160000 --- a/hw/deps/valentyusb +++ b/hw/deps/valentyusb @@ -1 +1 @@ -Subproject commit f47066124207b43d38cb0e6bffacedd8fb0f523e +Subproject commit 8151e2b34e74ebd20c435c637340293dadcc52c1 diff --git a/hw/lxbuildenv.py b/hw/lxbuildenv.py index 3690b5e..3b07935 100644 --- a/hw/lxbuildenv.py +++ b/hw/lxbuildenv.py @@ -229,9 +229,9 @@ def check_dependencies(args, dependency_list): sys.exit(0) # Return True if the given tree needs to be initialized -def check_module_recursive(root_path, depth, verbose=False): +def check_module_recursive(root_path, depth, verbose=False, breadcrumbs=[]): if verbose: - print('git-dep: checking if "{}" requires updating...'.format(root_path)) + print('git-dep: checking if "{}" requires updating (depth: {})...'.format(root_path, depth)) # If the directory isn't a valid git repo, initialization is required git_dir_cmd = subprocess.Popen(["git", "rev-parse", "--show-toplevel"], @@ -245,6 +245,12 @@ def check_module_recursive(root_path, depth, verbose=False): return True git_dir = git_stdout.decode().strip() + if git_dir in breadcrumbs: + if verbose: + print('git-dep: root path {} is not in git path'.format(root_path)) + return True + breadcrumbs.append(git_dir) + if not os.path.exists(git_dir + os.path.sep + '.git'): if verbose: print('git-dep: .git not found in "{}"'.format(git_dir)) @@ -262,7 +268,7 @@ def check_module_recursive(root_path, depth, verbose=False): parts = line.split("=", 2) if parts[0].strip() == "path": path = parts[1].strip() - if check_module_recursive(git_dir + os.path.sep + path, depth + 1, verbose=verbose): + if check_module_recursive(git_dir + os.path.sep + path, depth + 1, verbose=verbose, breadcrumbs=breadcrumbs): return True return False