From d6d72bc6e4545d216d89660f86781bbc34980fe9 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 29 Jul 2022 17:37:33 +0300 Subject: For rep-create, pkg-verify, and rep-info don't verify build-time toolchain dependency constraints if --ignore-unknown option is specified --- bpkg/pkg-verify.hxx | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) (limited to 'bpkg/pkg-verify.hxx') diff --git a/bpkg/pkg-verify.hxx b/bpkg/pkg-verify.hxx index b4b536b..631f0be 100644 --- a/bpkg/pkg-verify.hxx +++ b/bpkg/pkg-verify.hxx @@ -19,9 +19,11 @@ namespace bpkg pkg_verify (const pkg_verify_options&, cli::scanner& args); // Verify archive is a valid package and return its manifest. If requested, - // expand the file-referencing manifest values (description, changes, etc), - // setting them to the contents of files they refer to, set the potentially - // absent description-type value to the effective description type (see + // verify that all manifest entries are recognized and the package is + // compatible with the current toolchain. Also, if requested, expand the + // file-referencing manifest values (description, changes, etc), setting + // them to the contents of files they refer to, set the potentially absent + // description-type value to the effective description type (see // libbpkg/manifest.hxx), load the bootstrap, root, and config/*.build // buildfiles into the respective *-build values, and complete the // dependency constraints. @@ -42,6 +44,7 @@ namespace bpkg pkg_verify (const common_options&, const path& archive, bool ignore_unknown, + bool ignore_toolchain, bool expand_values, bool load_buildfiles, bool complete_depends = true, @@ -57,24 +60,34 @@ namespace bpkg pkg_verify (const common_options&, const dir_path& source, bool ignore_unknown, + bool ignore_toolchain, bool load_buildfiles, const function&, int diag_level = 2); // Pre-parse the package manifest and return the name value pairs list, - // stripping the format version and the end-of-manifest/stream pairs. Also - // verify that the package is compatible with the current toolchain and - // issue diagnostics and throw failed if it is not. Pass through the - // manifest_parsing and io_error exceptions, so that the caller can decide - // how to handle them (for example, ignore them if the manifest-printing - // process has failed, etc). + // stripping the format version and the end-of-manifest/stream pairs, + // together with the build2/bpkg build-time dependencies, if present. If + // requested, verify that the package is compatible with the current + // toolchain and issue diagnostics and throw failed if it is not. + // + // Pass through the manifest_parsing and io_error exceptions, so that the + // caller can decide how to handle them (for example, ignore them if the + // manifest-printing process has failed, etc). // // To omit the package location from the diagnostics, pass an empty path as // the what argument. // - vector + struct pkg_verify_result: vector + { + optional build2_dependency; + optional bpkg_dependency; + }; + + pkg_verify_result pkg_verify (const common_options&, butl::manifest_parser&, + bool ignore_toolchain, const path& what, int diag_level = 2); } -- cgit v1.1