aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-05-30 10:55:30 +0200
committerKaren Arutyunov <karen@codesynthesis.com>2022-06-07 21:15:37 +0300
commit6fbcb81432b8a41d90766cdfa9838f6b37fbb747 (patch)
treed39afbf72885fc335b98337f50aa28f0526fada7
parentec1a83e009a02b3180db0c68ec419d12c9dd6f5f (diff)
Minor pkg-build refactoring
-rw-r--r--bpkg/pkg-build.cxx38
1 files changed, 20 insertions, 18 deletions
diff --git a/bpkg/pkg-build.cxx b/bpkg/pkg-build.cxx
index 59e16eb..39b8414 100644
--- a/bpkg/pkg-build.cxx
+++ b/bpkg/pkg-build.cxx
@@ -1290,11 +1290,13 @@ namespace bpkg
dependents_map dependents;
packages dependencies;
+ // Shadow dependencies and clusters.
+ //
+ // See the collect lambda in collect_build_prerequisites() for details.
+ //
using positions = small_vector<pair<size_t, size_t>, 1>;
using shadow_dependents_map = map<config_package, positions>;
- // See the collect lambda in collect_build_prerequisites() for details.
- //
shadow_dependents_map shadow_dependents;
shadow_dependents_map shadow_cluster;
@@ -1684,19 +1686,11 @@ namespace bpkg
}
};
- // @@ TODO: describe.
- //
- struct retry_configuration
- {
- size_t depth;
- config_package dependent;
- pair<size_t, size_t> position;
- };
-
- struct merge_configuration
+ static ostream&
+ operator<< (ostream& os, const postponed_configuration& c)
{
- size_t depth;
- };
+ return os << c.string ();
+ }
// Note that we could be adding new/merging existing entries while
// processing an entry. Thus we use a list.
@@ -2033,11 +2027,19 @@ namespace bpkg
size_t next_id_ = 1;
};
- static ostream&
- operator<< (ostream& os, const postponed_configuration& c)
+ // @@ TODO: describe.
+ //
+ struct retry_configuration
{
- return os << c.string ();
- }
+ size_t depth;
+ config_package dependent;
+ pair<size_t, size_t> position;
+ };
+
+ struct merge_configuration
+ {
+ size_t depth;
+ };
// Packages with postponed prerequisites collection, for one of the
// following reasons: