From ee16762d8435ec1a6dfe4a82655cde5624bb2c38 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 12 Mar 2018 19:21:01 +0300 Subject: Add support for shallow fetch --- bpkg/package.hxx | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'bpkg/package.hxx') diff --git a/bpkg/package.hxx b/bpkg/package.hxx index 3567b10..5905dd2 100644 --- a/bpkg/package.hxx +++ b/bpkg/package.hxx @@ -597,11 +597,12 @@ namespace bpkg bool purge_src; // Path to the output directory of this package, if any. It is - // always relative to the configuration directory and currently - // is always -. It is only set once the package - // is configured and its main purse is to keep track of what - // needs to be cleaned by the user before a broken package can - // be purged. Note that it could be the same as out_root. + // always relative to the configuration directory, and is + // for external packages and - for others. It is + // only set once the package is configured and its main purse is + // to keep track of what needs to be cleaned by the user before + // a broken package can be purged. Note that it could be the + // same as src_root. // optional out_root; @@ -618,6 +619,19 @@ namespace bpkg return substate == package_substate::system; } + bool + external () const + { + return + // pkg-unpack / + // + (!repository.empty () && repository.directory_based ()) || + + // pkg-unpack --existing + // + (repository.empty () && !archive); + } + // Represent the wildcard version with the "*" string. Represent naturally // all other versions. // -- cgit v1.1