concretizer: fix failing unit tests
This commit is contained in:
parent
ab3f53d781
commit
cb76c5a90d
2 changed files with 18 additions and 4 deletions
|
@ -1031,7 +1031,11 @@ class Body(object):
|
|||
# add all clauses from dependencies
|
||||
if transitive:
|
||||
for dep in spec.traverse(root=False):
|
||||
clauses.extend(self.spec_clauses(dep, body, transitive=False))
|
||||
if dep.virtual:
|
||||
clauses.extend(self.virtual_spec_clauses(dep))
|
||||
else:
|
||||
clauses.extend(
|
||||
self.spec_clauses(dep, body, transitive=False))
|
||||
|
||||
return clauses
|
||||
|
||||
|
|
|
@ -62,7 +62,15 @@ dependency_conditions(P, D, T) :-
|
|||
#defined dependency_type/2.
|
||||
|
||||
% collect all the dependency conditions into a single conditional rule
|
||||
dependency_conditions_hold(Package, Dependency, ID) :-
|
||||
% distinguishing between Parent and Package is needed to account for
|
||||
% conditions like:
|
||||
%
|
||||
% depends_on('patchelf@0.9', when='@1.0:1.1 ^python@:2')
|
||||
%
|
||||
% that include dependencies
|
||||
dependency_conditions_hold(Parent, Dependency, ID) :-
|
||||
node(Package)
|
||||
: required_dependency_condition(ID, "node", Package);
|
||||
version(Package, Version)
|
||||
: required_dependency_condition(ID, "version", Package, Version);
|
||||
version_satisfies(Package, Constraint)
|
||||
|
@ -79,10 +87,12 @@ dependency_conditions_hold(Package, Dependency, ID) :-
|
|||
: required_dependency_condition(ID, "node_compiler", Package, Compiler);
|
||||
node_compiler_version(Package, Compiler, Version)
|
||||
: required_dependency_condition(ID, "node_compiler_version", Package, Compiler, Version);
|
||||
node_compiler_version_satisfies(Package, Compiler, Version)
|
||||
: required_dependency_condition(ID, "node_compiler_version_satisfies", Package, Compiler, Version);
|
||||
node_flag(Package, FlagType, Flag)
|
||||
: required_dependency_condition(ID, "node_flag", Package, FlagType, Flag);
|
||||
dependency_condition(Package, Dependency, ID);
|
||||
node(Package).
|
||||
dependency_condition(Parent, Dependency, ID);
|
||||
node(Parent).
|
||||
|
||||
#defined dependency_condition/3.
|
||||
#defined required_dependency_condition/3.
|
||||
|
|
Loading…
Reference in a new issue