Fix setting build dependencies of a build dependency from cli

This commit is contained in:
Massimiliano Culpo 2025-01-21 18:58:36 +01:00
parent 8ccf626306
commit bb65d495d9
No known key found for this signature in database
GPG Key ID: 3E52BB992233066C
2 changed files with 4 additions and 3 deletions

View File

@ -470,10 +470,11 @@ provider(ProviderNode, VirtualNode) :- attr("provider_set", ProviderNode, Virtua
% root ^dep %compiler
%
% where "compiler" is a dependency of "dep", but is enforced by a condition imposed by "root"
1 { attr("depends_on", node(min_dupe_id, A1), node(0..Y-1, A2), A3) : max_dupes(A2, Y) } 1
1 { attr("depends_on", node(A1_DUPE_ID, A1), node(0..Y-1, A2), A3) : max_dupes(A2, Y) } 1
:- impose(ID, RootNode),
unification_set("root", RootNode),
unification_set("root", node(min_dupe_id, A1)),
condition_set(RootNode, node(A1_DUPE_ID, A1)),
not self_build_requirement(RootNode, node(A1_DUPE_ID, A1)),
imposed_constraint(ID, "depends_on", A1, A2, A3),
internal_error("Build deps must land in exactly one duplicate").

View File

@ -116,7 +116,7 @@ def test_pkg_flags_from_compiler_and_none(concretize_scope, mock_packages):
concrete = dict(spack.concretize.concretize_together([(s1, None), (s2, None)]))
assert concrete[s1].compiler_flags["cflags"] == ["-Wall"]
assert concrete[s2].compiler_flags["cflags"] == []
assert concrete[s2]["cmake"].compiler_flags["cflags"] == []
@pytest.mark.parametrize(