Skip to content

Commit

Permalink
ports-mgmt/pkg: Fix the JSON compact output for pkg info.
Browse files Browse the repository at this point in the history
Revert the recent changes and restore the old behavior of one JSON entry per
line.
  • Loading branch information
loos-br committed Feb 24, 2025
1 parent 28a462a commit 629f859
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions ports-mgmt/pkg/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
PORTNAME= pkg
DISTVERSION= 2.0.6
PORTREVISION= 1
_PKG_VERSION= ${DISTVERSION}
CATEGORIES= ports-mgmt

Expand Down
16 changes: 16 additions & 0 deletions ports-mgmt/pkg/files/patch-src_utils.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
--- src/utils.c.orig 2025-02-24 14:58:49 UTC
+++ src/utils.c
@@ -339,12 +339,9 @@ print_info(struct pkg * const pkg, uint64_t options)
default:
outflags |= PKG_MANIFEST_EMIT_UCL;
}
- if (pkg_type(pkg) == PKG_REMOTE)
- outflags |= PKG_MANIFEST_EMIT_COMPACT;

pkg_emit_manifest_file(pkg, stdout, outflags);
- if (outflags & PKG_MANIFEST_EMIT_COMPACT)
- printf("\n");
+ printf("\n");
return;
}

0 comments on commit 629f859

Please sign in to comment.