diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2023-06-16 18:17:07 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2023-06-19 13:49:27 +0300 |
commit | 636d69c1b740d8975bb7c7a3b518c280ac224545 (patch) | |
tree | be9552beaea26413280bac12dabf07127bec4e28 /bpkg/pkg-checkout.cxx | |
parent | 5e6c781d4a1fafdb5e81c17b792cd36b7433ce90 (diff) |
Add --mask-repository pkg-build option
Diffstat (limited to 'bpkg/pkg-checkout.cxx')
-rw-r--r-- | bpkg/pkg-checkout.cxx | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/bpkg/pkg-checkout.cxx b/bpkg/pkg-checkout.cxx index 9793c41..d7b36e4 100644 --- a/bpkg/pkg-checkout.cxx +++ b/bpkg/pkg-checkout.cxx @@ -10,6 +10,7 @@ #include <bpkg/package-odb.hxx> #include <bpkg/database.hxx> #include <bpkg/checksum.hxx> +#include <bpkg/rep-mask.hxx> #include <bpkg/diagnostics.hxx> #include <bpkg/manifest-utility.hxx> @@ -148,14 +149,17 @@ namespace bpkg for (const package_location& l: ap->locations) { - const repository_location& rl (l.repository_fragment.load ()->location); - - if (rl.version_control_based () && (pl == nullptr || rl.local ())) + if (!rep_masked_fragment (l.repository_fragment)) { - pl = &l; + const repository_location& rl (l.repository_fragment.load ()->location); + + if (rl.version_control_based () && (pl == nullptr || rl.local ())) + { + pl = &l; - if (rl.local ()) - break; + if (rl.local ()) + break; + } } } |