Merge pull request #291371 from Yarny0/pythonCatchConflictsHook-recursion

pythonCatchConflictsHook: avoid infinite recursion
This commit is contained in:
lassulus
2024-02-25 23:53:14 +07:00
committed by GitHub
2 changed files with 11 additions and 1 deletions
@@ -57,7 +57,8 @@ def find_packages(store_path: Path, site_packages_path: str, parents: List[str])
with open(propagated_build_inputs, "r") as f:
build_inputs: List[str] = f.read().strip().split(" ")
for build_input in build_inputs:
find_packages(Path(build_input), site_packages_path, parents + [build_input])
if build_input not in parents:
find_packages(Path(build_input), site_packages_path, parents + [build_input])
find_packages(out_path, site_packages_path, [f"this derivation: {out_path}"])
@@ -78,6 +78,15 @@ in {
];
};
# multi-output derivation with dependency on itself must not crash
cyclic-dependencies =
generatePythonPackage {
pname = "cyclic-dependencies";
preFixup = ''
propagatedBuildInputs+=("$out")
'';
};
# Simplest test case that should trigger a conflict
catches-simple-conflict = let
# this build must fail due to conflicts