From 319fa82477c6304e869bcbff14768408fad211ed Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 16 Jan 2023 14:52:26 +0200 Subject: Review --- libbpkg/manifest.cxx | 4 ++++ libbpkg/manifest.hxx | 17 ++++++++++++----- 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 - // `[_]-*` form. For example: + // The name is prefixed with the id, typically name/version + // pair in the [_] 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: + // + // -name + // -version + // -to-downstream-version + // + // Note that the value format/semantics can be distribution-specific. // struct distribution_name_value { -- cgit v1.1