aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbpkg/manifest.cxx4
-rw-r--r--libbpkg/manifest.hxx17
2 files changed, 16 insertions, 5 deletions
diff --git a/libbpkg/manifest.cxx b/libbpkg/manifest.cxx
index 119f894..c4e4ed3 100644
--- a/libbpkg/manifest.cxx
+++ b/libbpkg/manifest.cxx
@@ -4051,6 +4051,8 @@ namespace bpkg
parse_distribution (move (n), n.size () - 22, move (v)),
false /* unique */);
}
+ // Note: must follow the check for "upstream-version".
+ //
else if (n.size () > 8 && n.compare (n.size () - 8, 8, "-version") == 0)
{
// If the value is forbidden then throw, but only after the name is
@@ -4316,6 +4318,8 @@ namespace bpkg
const string& n (nv.name);
string& v (nv.value);
+ // @@ redo by checking no other `-`.
+ //
if (v == "$" &&
(n.size () > 8 && n.compare (n.size () - 8, 8, "-version") == 0) &&
(n.size () <= 22 ||
diff --git a/libbpkg/manifest.hxx b/libbpkg/manifest.hxx
index 120884a..2d75b20 100644
--- a/libbpkg/manifest.hxx
+++ b/libbpkg/manifest.hxx
@@ -1132,13 +1132,20 @@ namespace bpkg
// Binary distribution package information.
//
- // The name is prefixed with the distribution name/version and has the
- // `<name>[_<version>]-*` form. For example:
+ // The name is prefixed with the <distribution> id, typically name/version
+ // pair in the <name>[_<version>] form. For example:
//
- // debian
- // debian_10
+ // debian-name
+ // debian_10-name
+ // ubuntu_20.04-name
//
- // Note that the value semantics can be distribution-specific.
+ // Currently recognized names:
+ //
+ // <distribution>-name
+ // <distribution>-version
+ // <distribution>-to-downstream-version
+ //
+ // Note that the value format/semantics can be distribution-specific.
//
struct distribution_name_value
{