From 3dbfc8124a092c0a218b0bef5454063bc86c1e3e Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 24 Apr 2017 16:09:07 +0300 Subject: Add support for build-email package manifest value --- bpkg/manifest | 2 ++ bpkg/manifest.cxx | 13 +++++++++++++ tests/manifest/testscript | 3 +++ 3 files changed, 18 insertions(+) diff --git a/bpkg/manifest b/bpkg/manifest index 8ad9512..f638592 100644 --- a/bpkg/manifest +++ b/bpkg/manifest @@ -233,6 +233,7 @@ namespace bpkg // email // package-email + // build-email // class email: public std::string { @@ -339,6 +340,7 @@ namespace bpkg butl::optional package_url; email_type email; butl::optional package_email; + butl::optional build_email; std::vector dependencies; std::vector requirements; diff --git a/bpkg/manifest.cxx b/bpkg/manifest.cxx index 107c2fe..2236d3a 100644 --- a/bpkg/manifest.cxx +++ b/bpkg/manifest.cxx @@ -848,6 +848,15 @@ namespace bpkg package_email = email_type (move (v), move (c)); } + else if (n == "build-email") + { + if (build_email) + bad_name ("build email redefinition"); + + string c (split_comment (v)); + + build_email = email_type (move (v), move (c)); + } else if (n == "priority") { if (priority) @@ -1242,6 +1251,10 @@ namespace bpkg s.next ("package-email", add_comment (*package_email, package_email->comment)); + if (build_email) + s.next ("build-email", + add_comment (*build_email, build_email->comment)); + for (const auto& d: dependencies) s.next ("depends", (d.conditional diff --git a/tests/manifest/testscript b/tests/manifest/testscript index 99fff14..870d48d 100644 --- a/tests/manifest/testscript +++ b/tests/manifest/testscript @@ -28,6 +28,8 @@ email: libfoo-users@example.org; Public mailing list, posts by non-members\ are allowed but moderated. package-email: libfoo-1.2.3+2@example.org; Bug reports are welcome. + build-email: libfoo-builds@example.org; Mailing list for bbot notification\ + emails. depends: libz depends: libgnutls <= 1.2.3 | libopenssl >= 2.3.4 depends: ? libboost-regex >= 1.52.0; Only if C++ compiler does not support\ @@ -49,6 +51,7 @@ tags: c++, xml, modern url: http://www.example.org/projects/libbar/ email: libbar-users@example.org + build-email: depends: libbaz (1- 2-) | libbaz [3 4-) | libbaz (5 6] | libbaz [7 8] location: bar/libbar-3.4A.5+6.tbz sha256sum: d4b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -- cgit v1.1