aboutsummaryrefslogtreecommitdiff
path: root/bpkg/database.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2021-07-01 21:08:54 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2021-07-01 21:08:54 +0300
commitca439ff4ca3f36a803419575e2db3a3ab4775c4b (patch)
treec052a03cffd1856f736a4c1f07afb0462f5c61da /bpkg/database.hxx
parent441cd214f04b8738c3fd92dd3c1a8ad1f2e56ba8 (diff)
Add support for build2 configurations
Diffstat (limited to 'bpkg/database.hxx')
-rw-r--r--bpkg/database.hxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/bpkg/database.hxx b/bpkg/database.hxx
index 4e54bb7..8367ed7 100644
--- a/bpkg/database.hxx
+++ b/bpkg/database.hxx
@@ -392,6 +392,18 @@ namespace bpkg
return os;
}
+ inline string
+ buildtime_dependency_config_type (const package_name& nm)
+ {
+ return nm.string ().compare (0, 10, "libbuild2-") == 0 ? "build2" : "host";
+ }
+
+ inline string
+ dependency_config_type (database& db, const package_name& nm, bool buildtime)
+ {
+ return buildtime ? buildtime_dependency_config_type (nm) : db.type;
+ }
+
// Transaction wrapper that allow the creation of dummy transactions (start
// is false) that in reality use an existing transaction.
//