From a93c2bf2c44bba4c88ed7f9d974a76fcf03e6150 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 29 Mar 2023 13:25:24 +0200 Subject: Tweak structured result format in pkg-bindist --- bpkg/pkg-bindist.cli | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'bpkg/pkg-bindist.cli') diff --git a/bpkg/pkg-bindist.cli b/bpkg/pkg-bindist.cli index 71497f5..4160a12 100644 --- a/bpkg/pkg-bindist.cli +++ b/bpkg/pkg-bindist.cli @@ -754,15 +754,15 @@ namespace bpkg struct file { - string path; string type; + string path; + optional system_name; }; struct package { string name; string version; - optional system_name; optional system_version; vector files; }; @@ -795,16 +795,17 @@ namespace bpkg \"package\": { \"name\": \"libfoo\", \"version\": \"2.5.0-b.23\", - \"system_name\": \"libfoo\", \"system_version\": \"2.5.0~b.23-0~debian11\", \"files\": [ { + \"type\": \"main.deb\", \"path\": \"/tmp/libfoo_2.5.0~b.23-0~debian11_amd64.deb\", - \"type\": \"main.deb\" + \"system_name\": \"libfoo\" }, { + \"type\": \"dev.deb\", \"path\": \"/tmp/libfoo-dev_2.5.0~b.23-0~debian11_amd64.deb\", - \"type\": \"dev.deb\" + \"system_name\": \"libfoo-dev\" }, ... ] @@ -828,8 +829,11 @@ namespace bpkg Production} for background. For the \cb{archive} distribution this is the archive type (\cb{--archive-type}), for example, \cb{tar.xz} or \cb{zip}. - The \cb{system_name} and \cb{system_version} members in \cb{package} are + The \cb{package::system_version} and \cb{file::system_name} members are absent if not applicable to the distribution (for example, \cb{archive}). + The \cb{file::system_name} member is also absent if the file is not a + binary package (for example, \cb{.changes} and \cb{.buildid} files in the + \cb{debian} distribution). " // NOTE: remember to add the corresponding `--class-doc ...=exclude-base` -- cgit v1.1