<?xml version="1.0" encoding="iso-8859-1"?>
<!--Arbortext, Inc., 1988-2008, v.4002-->
<!ENTITY % ent SYSTEM "entities.ent">
%ent;
]>
<refentry id="pkgfmt-1">
<refmeta><refentrytitle>pkgfmt</refentrytitle><manvolnum>1</manvolnum>
<refmiscinfo class="date">21 May 2013</refmiscinfo>
<refmiscinfo class="sectdesc">&man1;</refmiscinfo>
<refmiscinfo class="software">&release;</refmiscinfo>
<refmiscinfo class="arch">generic</refmiscinfo>
<refmiscinfo class="copyright">Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.</refmiscinfo>
</refmeta>
<refnamediv>
<refname>pkgfmt</refname><refpurpose>format a package manifest</refpurpose>
</refnamediv>
<refsynopsisdiv><title></title>
</synopsis>
</refsynopsisdiv>
<refsect1 id="pkgfmt-1-desc" role="description"><title></title>
<para><command>pkgfmt</command> without the <option>c</option> or <option>d</option> options
formats a package manifest in a consistent manner, including wrapping lines
at 80 characters, sorting actions by type, and sorting attributes. Lines that
do not parse into actions (such as macros, comments, or transforms) do not
appear in sorted order.</para>
<para>If no arguments are given, <command>pkgfmt</command> reads <literal>stdin</literal> until
EOF, and then writes the formatted manifest to <literal>stdout</literal>.
Any manifests specified on the command line are formatted in place.</para>
<para><command>pkgfmt</command> with the <option>c</option> option checks
whether the manifests are formatted in <command>pkgfmt</command> style. The <option>
d</option> option displays the differences if the file is not properly formatted.
</para>
</refsect1>
<refsect1 role="options"><title></title>
<para>The following options are supported:</para>
<variablelist>
<varlistentry><term><option>?</option></term><term><option>-help</option></term>
<listitem><para>Display a usage message.</para>
</listitem>
</varlistentry>
<varlistentry><term><option>c</option></term>
<listitem><para>Check whether the manifest is formatted in the <command>pkgfmt</command> style.
</para>
</listitem>
</varlistentry>
<varlistentry><term><option>d</option></term>
<listitem><para>Display manifest differences from the formatted version in
unified form.</para>
</listitem>
</varlistentry>
<varlistentry><term><option>u</option></term>
<listitem><para>Do not wrap lines at 80 characters. This option is useful
for applying traditional text processing tools to package manifests.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="exit-status"><title></title>
<para>The following exit values are returned:</para>
<variablelist>
<varlistentry><term><returnvalue>0</returnvalue></term>
<listitem><para>Command succeeded.</para>
</listitem>
</varlistentry>
<varlistentry><term><returnvalue>1</returnvalue></term>
<listitem><para>The <option>c</option> or <option>d</option> options were
specified, and one or more manifests are not in <command>pkgfmt</command> normal
form, or an error occurred.</para>
</listitem>
</varlistentry>
<varlistentry><term><returnvalue>2</returnvalue></term>
<listitem><para>Invalid command line options were specified.</para>
</listitem>
</varlistentry>
<varlistentry><term><returnvalue>99</returnvalue></term>
<listitem><para>An unanticipated exception occurred.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="attributes"><title></title>
<para>See <literal>attributes</literal>(7) for descriptions of the following
attributes:</para>
<informaltable frame="all" orient="port">
<tgroup cols="2" colsep="1" rowsep="1"><colspec colname="col1" colwidth="198*"
align="left"/><colspec colname="col2" colwidth="198*" align="left"/><thead>
<row>
<entry align="center">
<para>ATTRIBUTE TYPE</para>
</entry>
<entry align="center">
<para>ATTRIBUTE VALUE</para>
</entry>
</row>
</thead>
<tbody>
<row>
<entry align="left">
<para>Availability</para>
</entry>
<entry align="left">
</entry>
</row>
<row>
<entry align="left">
<para>Interface Stability</para>
</entry>
<entry align="left">
<para>Uncommitted</para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable></refsect1>
<refsect1 role="see-also"><title></title>
<para><olink targetdoc="refman" targetptr="pkg-7"><citerefentry><refentrytitle>pkg</refentrytitle><manvolnum>7</manvolnum></citerefentry></olink></para>
</refsect1>
</refentry>