diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2021-08-25 20:24:57 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2021-08-30 15:57:58 +0300 |
commit | 00a83b2ab6ca84776dfb5bec1679863c1896a813 (patch) | |
tree | 5d0e1a96fb5ab5ba1bb32620c1eb265fc519d122 /bpkg/pkg-unpack.cxx | |
parent | e30e71dee35d8e7b1a1c4759bc839533521033e8 (diff) |
Consider repository information from ultimate dependent databases rather then from just main database
Diffstat (limited to 'bpkg/pkg-unpack.cxx')
-rw-r--r-- | bpkg/pkg-unpack.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/bpkg/pkg-unpack.cxx b/bpkg/pkg-unpack.cxx index 04250f8..862feac 100644 --- a/bpkg/pkg-unpack.cxx +++ b/bpkg/pkg-unpack.cxx @@ -214,7 +214,8 @@ namespace bpkg shared_ptr<selected_package> pkg_unpack (const common_options& o, - database& db, + database& pdb, + database& rdb, transaction& t, package_name n, version v, @@ -223,21 +224,19 @@ namespace bpkg { tracer trace ("pkg_unpack"); - tracer_guard tg (db, trace); + tracer_guard tg (pdb, trace); // NOTE: sets tracer for the whole cluster. // Check/diagnose an already existing package. // - pkg_unpack_check (db, t, n, replace); - - database& mdb (db.main_database ()); + pkg_unpack_check (pdb, t, n, replace); - check_any_available (mdb, t); + check_any_available (rdb, t); // Note that here we compare including the revision (see pkg-fetch() // implementation for more details). // shared_ptr<available_package> ap ( - mdb.find<available_package> (available_package_id (n, v))); + rdb.find<available_package> (available_package_id (n, v))); if (ap == nullptr) fail << "package " << n << " " << v << " is not available"; @@ -267,7 +266,7 @@ namespace bpkg const repository_location& rl (pl->repository_fragment->location); return pkg_unpack (o, - db, + pdb, t, move (n), move (v), @@ -417,7 +416,8 @@ namespace bpkg p = v.empty () ? pkg_unpack (o, db, t, n, false /* simulate */) : pkg_unpack (o, - db, + db /* pdb */, + db /* rdb */, t, move (n), move (v), |