From ca439ff4ca3f36a803419575e2db3a3ab4775c4b Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 1 Jul 2021 21:08:54 +0300 Subject: Add support for build2 configurations --- bpkg/database.hxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'bpkg/database.hxx') 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. // -- cgit v1.1