aboutsummaryrefslogtreecommitdiff
path: root/load
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2021-12-22 21:52:01 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2022-01-17 19:22:38 +0300
commit4a5ca6f9853938eec8b5e487dc6cb3728dfb6a15 (patch)
tree29963bae3dddd53f8d17b10e0e77761f62a78d25 /load
parent36115f92a7fdebaf13cb968b1acfe3c9973c0df4 (diff)
Adapt to package manifest dependency classes change
Diffstat (limited to 'load')
-rw-r--r--load/load.cxx50
1 files changed, 24 insertions, 26 deletions
diff --git a/load/load.cxx b/load/load.cxx
index 34e59a7..ad5379e 100644
--- a/load/load.cxx
+++ b/load/load.cxx
@@ -499,43 +499,41 @@ load_packages (const shared_ptr<repository>& rp,
for (auto& das: pm.dependencies)
{
- // Ignore special build2 and bpkg dependencies. We may not have
- // packages for them and also showing them for every package is
- // probably not very helpful.
- //
- if (das.buildtime && !das.empty ())
- {
- const auto& da (das.front ());
-
- assert (da.size () == 1); // @@ DEP
-
- const package_name& n (da[0].name);
- if (n == "build2" || n == "bpkg")
- continue;
- }
-
- tds.emplace_back (das.conditional,
- das.buildtime,
- move (das.comment));
-
- dependency_alternatives& tdas (tds.back ());
+ dependency_alternatives tdas (das.buildtime, move (das.comment));
for (auto& da: das)
{
- tdas.push_back (dependency_alternative (move (da.enable)));
- dependency_alternative& tda (tdas.back ());
+ dependency_alternative tda (move (da.enable),
+ move (da.reflect),
+ move (da.prefer),
+ move (da.accept),
+ move (da.require));
for (auto& d: da)
{
+ package_name& n (d.name);
+
+ // Ignore special build2 and bpkg dependencies. We may not have
+ // packages for them and also showing them for every package is
+ // probably not very helpful.
+ //
+ if (das.buildtime && (n == "build2" || n == "bpkg"))
+ continue;
+
// The package member will be assigned during dependency
// resolution procedure.
//
- tda.push_back (
- dependency {move (d.name),
- move (d.constraint),
- nullptr /* package */});
+ tda.push_back (dependency {move (n),
+ move (d.constraint),
+ nullptr /* package */});
}
+
+ if (!tda.empty ())
+ tdas.push_back (move (tda));
}
+
+ if (!tdas.empty ())
+ tds.push_back (move (tdas));
}
small_vector<brep::test_dependency, 1> ts;