aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bpkg/manifest10
-rw-r--r--bpkg/manifest.cxx6
2 files changed, 11 insertions, 5 deletions
diff --git a/bpkg/manifest b/bpkg/manifest
index 75f87bd..a06eea7 100644
--- a/bpkg/manifest
+++ b/bpkg/manifest
@@ -321,17 +321,17 @@ namespace bpkg
//
repository_location () = default;
- // If the argument is not empty, creates remote/absolute repository
- // location. Throws invalid_argument if the location is a relative
- // path. If the argument is empty, then creates the special empty
+ // If the argument is not empty, create remote/absolute repository
+ // location. Throw invalid_argument if the location is a relative
+ // path. If the argument is empty, then create the special empty
// location.
//
explicit
repository_location (const std::string&);
- // Creates a potentially relative repository location. If base is not
+ // Create a potentially relative repository location. If base is not
// empty, use it to complete the relative location to remote/absolute.
- // Throws invalid_argument if base is not empty but the location is
+ // Throw invalid_argument if base is not empty but the location is
// empty, base itself is relative, or the resulting completed location
// is invalid.
//
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");