From d0e478348ab1362e22e426b2b3dbb3becf2d6a24 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 1 Aug 2023 21:06:05 +0300 Subject: Fix pkg-fetch which failed to re-fetch same package version in --replace mode --- bpkg/package.hxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'bpkg/package.hxx') 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 (archive)); + return archive->absolute () ? *archive : configuration / *archive; + } + // Return the relative source directory completed using the configuration // directory. Return the absolute source directory as is. // -- cgit v1.1