From 309cccfffc15657dd8654aa6a14e444bb47417ae Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 21 Feb 2022 22:54:05 +0300 Subject: Increment version iteration for external packages on buildfiles change --- bpkg/package.cxx | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) (limited to 'bpkg/package.cxx') diff --git a/bpkg/package.cxx b/bpkg/package.cxx index c8ad9d6..da560f2 100644 --- a/bpkg/package.cxx +++ b/bpkg/package.cxx @@ -654,7 +654,21 @@ namespace bpkg bool changed (mc != *p->manifest_checksum); - // If the manifest didn't changed but the selected package points to an + // If the manifest hasn't changed and the package has buildfile clauses in + // the dependencies, then check if the buildfiles haven't changed either. + // + if (!changed && p->buildfiles_checksum) + { + // Always calculate the checksum over the buildfiles since the package + // is external. + // + changed = package_buildfiles_checksum ( + nullopt /* bootstrap_build */, + nullopt /* root_build */, + d) != *p->buildfiles_checksum; + } + + // If the manifest hasn't changed but the selected package points to an // external source directory, then we also check if the directory have // moved. // @@ -840,19 +854,4 @@ namespace bpkg return false; } - - bool - evaluate_enabled (const dependency_alternative& da, - const string& /* bootstrap_build */, - const optional& /* root_build */, - const package_name& pkg) - { - // @@ DEP TMP - // - if (da.enable) - fail << "conditional dependency for package " << pkg << - info << "conditional dependencies are not yet supported"; - - return true; - } } -- cgit v1.1