From 221f0250fcd7cba4fa4b5e4fd6c0d410eb6e5811 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 21 Sep 2015 18:08:39 +0200 Subject: Implement rep-add command --- bpkg/cfg-create.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'bpkg/cfg-create.cxx') diff --git a/bpkg/cfg-create.cxx b/bpkg/cfg-create.cxx index 44728b8..be85d92 100644 --- a/bpkg/cfg-create.cxx +++ b/bpkg/cfg-create.cxx @@ -9,6 +9,8 @@ #include #include +#include +#include #include #include #include @@ -116,7 +118,13 @@ namespace bpkg // Create the database. // - open (c, trace, true); + database db (open (c, trace, true)); + + // Add the special, root repository object with empty location. + // + transaction t (db.begin ()); + db.persist (repository (repository_location ())); + t.commit (); if (verb) { -- cgit v1.1