diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2018-03-08 18:55:41 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-03-09 14:54:52 +0300 |
commit | a9dcee01b4d4d39d18db60092533dc2985d1c2d4 (patch) | |
tree | a784424c8cba314d938478d8728c3efe08db6264 /bpkg/pkg-build.cxx | |
parent | 78229192fc54ec1822bb29146f08386e3c60f813 (diff) |
Prefer dir repository type over others for pkg-build
Diffstat (limited to 'bpkg/pkg-build.cxx')
-rw-r--r-- | bpkg/pkg-build.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bpkg/pkg-build.cxx b/bpkg/pkg-build.cxx index 3a301c8..efe7e20 100644 --- a/bpkg/pkg-build.cxx +++ b/bpkg/pkg-build.cxx @@ -1950,10 +1950,12 @@ namespace bpkg if (pl.repository.object_id () != "") // Special root? { + transaction t (db.begin ()); + // Go through package repositories to decide if we should fetch, // checkout or unpack depending on the available repository basis. - // Preferring a local one over the remotes seems like a sensible - // thing to do. + // Preferring a local one over the remotes and the dir repository + // type over the others seems like a sensible thing to do. // optional<repository_basis> basis; @@ -1965,15 +1967,13 @@ namespace bpkg { basis = rl.basis (); - if (rl.local ()) + if (rl.directory_based ()) break; } } assert (basis); - transaction t (db.begin ()); - // All calls commit the transaction. // switch (*basis) |