[Bug 284263] ports-mgmt/pkg: [1.21.3] --raw-format is broken when multiple packages are supplied
- Reply: bugzilla-noreply_a_freebsd.org: "maintainer-feedback requested: [Bug 284263] ports-mgmt/pkg: [1.21.3] --raw-format is broken when multiple packages are supplied"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 284263] ports-mgmt/pkg: [1.21.3] --raw-format is broken when multiple packages are supplied"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 22 Jan 2025 15:51:45 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=284263
Bug ID: 284263
Summary: ports-mgmt/pkg: [1.21.3] --raw-format is broken when
multiple packages are supplied
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: Individual Port(s)
Assignee: pkg@FreeBSD.org
Reporter: dch@freebsd.org
Assignee: pkg@FreeBSD.org
Flags: maintainer-feedback?(pkg@FreeBSD.org)
pkg version: pkg-1.21.3, json_verify comes from devel/yajl
$ pkg info --raw --raw-format json pkg | json_verify
JSON is valid
$ pkg info --raw --raw-format json pkg bash | json_verify
parse error: trailing garbage
{ "name": "pkg", "orig
(right here) ------^
JSON is invalid
This is because `pkg info .. $THING` returns a JSON object,
but `pkg info .. $THING1 $THING2` returns 2 JSON objects:
```
...
}{
"name": "bash",
"origin": "shells/bash",
...
```
One possible solution is to wrap multiple packages in an array, and add
a , separator.
Also, --raw-format *requires* --raw, perhaps set --raw flag if --raw-format
is already found on command line.
--
You are receiving this mail because:
You are the assignee for the bug.