aboutsummaryrefslogtreecommitdiff
path: root/bpkg/database.hxx
diff options
context:
space:
mode:
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.
//