diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2023-08-01 21:06:05 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2023-08-04 13:01:50 +0300 |
commit | d0e478348ab1362e22e426b2b3dbb3becf2d6a24 (patch) | |
tree | 8704d4ce6e12ca5103db492cb20dfd08a0853858 /bpkg/package.hxx | |
parent | 67d42b48930f65a7e270e153f1ca627c5241d17b (diff) |
Fix pkg-fetch which failed to re-fetch same package version in --replace mode
Diffstat (limited to 'bpkg/package.hxx')
-rw-r--r-- | bpkg/package.hxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bpkg/package.hxx b/bpkg/package.hxx index 02d2b07..947393b 100644 --- a/bpkg/package.hxx +++ b/bpkg/package.hxx @@ -1318,6 +1318,18 @@ namespace bpkg std::string string (database&) const; + // Return the relative archive path completed using the configuration + // directory. Return the absolute archive path as is. + // + path + effective_archive (const dir_path& configuration) const + { + // Cast for compiling with ODB (see above). + // + assert (static_cast<bool> (archive)); + return archive->absolute () ? *archive : configuration / *archive; + } + // Return the relative source directory completed using the configuration // directory. Return the absolute source directory as is. // |