PKGFMT(1) | User Commands | PKGFMT(1) |
pkgfmt
— format a
package manifest
pkgfmt |
[-c |-d |-s |-u ]
[-f
v1 |v2 ]
[package-manifest-file] |
pkgfmt
without the
-c
or -d
options formats a
package manifest in a consistent manner, including wrapping lines at 80
characters, sorting lines by attributes. There are two different output
formats - v1
and v2
- which
have different sorting characteristics and are described below. The default
output format is v2
. Lines that do not parse into
actions (such as macros, comments, or transforms) do not appear in sorted
order.
If no arguments are given, pkgfmt
reads
stdin
until EOF, and then writes the formatted
manifest to stdout
. Any manifests specified on the
command line are formatted in place.
pkgfmt
with the -c
option checks whether the manifests are formatted in
pkgfmt
style. The -d
option
displays the differences if the file is not properly formatted.
pkgfmt
with the -s
option removes additional diagnostic attributes from actions that are not
required in a published manifest.
pkgfmt
supports two different output
formats selectable with the -f
option. The default
format is v2
.
v1
v1
format places set
actions first, depend
actions last and all other
actions in between, sorted alphabetically. Actions are secondarily sorted
by their primary attribute.v2
v2
format groups actions together into
different sections. The resulting action order is:
set
actionsdriver
,
group
and user
actionslegacy
and license
actionsdepend
actions.In particular, this format groups
file
, dir
,
link
and hardlink
actions together by path which can aid readability.
The following options are supported:
-h
|
-help
| -?
-c
pkgfmt
style.-d
-f
v1
|v2
-s
-u
The following exit values are returned:
-c
or -d
options were
specified, and one or more manifests are not in
pkgfmt
normal form, or an error occurred.The following environment variable is supported:
PKGFMT_OUTPUT
v1
or
v2
, overriding the built-in default value of
v2
.The command line interface of pkgfmt
is
Uncommitted.
The output of pkgfmt
is
Not-An-Interface
and may change at any time.
February 17, 2022 | OmniOS |