From fbaa48b8ebf22d97bb224444603523ed03b98854 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 31 Jul 2023 22:01:32 +0300 Subject: Add support for specifying package archive and directory as a dependency for pkg-build Also make sure that a package specified as an archive or directory always replaces selected package. Also add support for deorphaning and upgrading of such a package. --- bpkg/pkg-build-collect.hxx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'bpkg/pkg-build-collect.hxx') diff --git a/bpkg/pkg-build-collect.hxx b/bpkg/pkg-build-collect.hxx index 144fbd3..1764b3a 100644 --- a/bpkg/pkg-build-collect.hxx +++ b/bpkg/pkg-build-collect.hxx @@ -345,17 +345,19 @@ namespace bpkg // static const uint16_t build_reevaluate = 0x0008; - // Set if this build action is for deorphaning of an existing package. + // Set if this build action is for replacing of an existing package due to + // deorphaning or rebuilding as an archive or directory. // - // Note that to deorphan a package we need to re-fetch it from an existing - // repository fragment (even if its version doesn't change). + // Note that to replace a package we need to re-fetch it from an existing + // repository fragment, archive, or directory (even if its version doesn't + // change). // - static const uint16_t build_deorphan = 0x0010; + static const uint16_t build_replace = 0x0010; bool - deorphan () const + replace () const { - return (flags & build_deorphan) != 0; + return (flags & build_replace) != 0; } bool -- cgit v1.1