aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/version
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/version')
-rw-r--r--libbuild2/version/init.cxx8
-rw-r--r--libbuild2/version/rule.cxx4
2 files changed, 5 insertions, 7 deletions
diff --git a/libbuild2/version/init.cxx b/libbuild2/version/init.cxx
index 9a56756..3ab3621 100644
--- a/libbuild2/version/init.cxx
+++ b/libbuild2/version/init.cxx
@@ -303,8 +303,7 @@ namespace build2
// Load in.base (in.* variables, in{} target type).
//
- if (!cast_false<bool> (rs["in.base.loaded"]))
- load_module (rs, rs, "in.base", l);
+ load_module (rs, rs, "in.base", l);
module& m (static_cast<module&> (*mod));
const standard_version& v (m.version);
@@ -312,12 +311,11 @@ namespace build2
// If the dist module is used, set its dist.package and register the
// post-processing callback.
//
- if (auto* dm = rs.lookup_module<dist::module> (dist::module::name))
+ if (auto* dm = rs.find_module<dist::module> (dist::module::name))
{
// Make sure dist is init'ed, not just boot'ed.
//
- if (!cast_false<bool> (rs["dist.loaded"]))
- load_module (rs, rs, "dist", l);
+ load_module (rs, rs, "dist", l);
m.dist_uncommitted = cast_false<bool> (rs["config.dist.uncommitted"]);
diff --git a/libbuild2/version/rule.cxx b/libbuild2/version/rule.cxx
index fe999b3..463b6e0 100644
--- a/libbuild2/version/rule.cxx
+++ b/libbuild2/version/rule.cxx
@@ -80,7 +80,7 @@ namespace build2
// If we match, lookup and cache the module for the update operation.
//
if (r && a == perform_update_id)
- t.data (rs.lookup_module<module> (module::name));
+ t.data (rs.find_module<module> (module::name));
return r;
}
@@ -319,7 +319,7 @@ namespace build2
const path& p (t.path ());
const scope& rs (t.root_scope ());
- const module& m (*rs.lookup_module<module> (module::name));
+ const module& m (*rs.find_module<module> (module::name));
if (!m.rewritten)
return auto_rmfile (p, false /* active */);