diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2018-03-12 19:21:01 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-03-12 19:37:35 +0300 |
commit | ee16762d8435ec1a6dfe4a82655cde5624bb2c38 (patch) | |
tree | 338c5488966c1e7d35f5afa20e78f153443b1b32 /bpkg/package.hxx | |
parent | 17ea04afcce1af129cac9dd2f840799a6e8b50eb (diff) |
Add support for shallow fetch
Diffstat (limited to 'bpkg/package.hxx')
-rw-r--r-- | bpkg/package.hxx | 24 |
1 files changed, 19 insertions, 5 deletions
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 <name>-<version>. 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 <name> + // for external packages and <name>-<version> 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<dir_path> out_root; @@ -618,6 +619,19 @@ namespace bpkg return substate == package_substate::system; } + bool + external () const + { + return + // pkg-unpack <name>/<version> + // + (!repository.empty () && repository.directory_based ()) || + + // pkg-unpack --existing <dir> + // + (repository.empty () && !archive); + } + // Represent the wildcard version with the "*" string. Represent naturally // all other versions. // |