From 8cdb20a6ef2e87839c8e4f4c4e99fdafb7db9299 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 25 Sep 2015 13:32:35 +0200 Subject: Check for location redefinition in repository_manifest constructor --- bpkg/manifest.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'bpkg/manifest.cxx') diff --git a/bpkg/manifest.cxx b/bpkg/manifest.cxx index bc1531d..5a3357e 100644 --- a/bpkg/manifest.cxx +++ b/bpkg/manifest.cxx @@ -729,6 +729,9 @@ namespace bpkg void package_manifest:: serialize (serializer& s) const { + // @@ Should we check that all non-optional values are specified ? + // + s.next ("", "1"); // Start of manifest. s.next ("name", name); s.next ("version", version.string ()); @@ -1114,6 +1117,9 @@ namespace bpkg if (n == "location") { + if (!location.empty ()) + bad_name ("location redefinition"); + if (v.empty ()) bad_value ("empty location"); -- cgit v1.1