aboutsummaryrefslogtreecommitdiff
path: root/bpkg/rep-add.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2021-04-22 21:57:13 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2021-07-09 14:06:57 +0300
commit5d513688ae07d96910dd1eef83bdad4e9d780373 (patch)
tree402a87bbdb79a5a2392b714553e567465c3415c1 /bpkg/rep-add.cxx
parent50a5c7b14250dab7941e8b0a67dfe6c442d2c5a9 (diff)
Add support for linked configurations
Diffstat (limited to 'bpkg/rep-add.cxx')
-rw-r--r--bpkg/rep-add.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/bpkg/rep-add.cxx b/bpkg/rep-add.cxx
index 6856437..81b1286 100644
--- a/bpkg/rep-add.cxx
+++ b/bpkg/rep-add.cxx
@@ -16,12 +16,12 @@ namespace bpkg
{
shared_ptr<repository>
rep_add (const common_options& o,
- transaction& t,
+ database& db,
+ transaction&,
const repository_location& rl)
{
const string& rn (rl.canonical_name ());
- database& db (t.database ());
shared_ptr<repository> r (db.find<repository> (rn));
bool updated (false);
@@ -65,7 +65,7 @@ namespace bpkg
fail << "repository location argument expected" <<
info << "run 'bpkg help rep-add' for more information";
- database db (open (c, trace));
+ database db (c, trace, false /* pre_attach */);
transaction t (db);
session s; // Repository dependencies can have cycles.
@@ -77,7 +77,7 @@ namespace bpkg
? optional<repository_type> (o.type ())
: nullopt));
- rep_add (o, t, rl);
+ rep_add (o, db, t, rl);
}
t.commit ();