Fix the pkg-message documentation, it ways lagging behind policies.
This commit is contained in:
parent
ca61351087
commit
ee52f261ee
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=54055
1 changed files with 13 additions and 38 deletions
|
@ -62,8 +62,8 @@
|
||||||
<term>raw</term>
|
<term>raw</term>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>A regular plain text file. Its message is always
|
<para>A regular plain text file. Its message is only
|
||||||
displayed, on install, and on upgrade.</para>
|
displayed on install.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
@ -140,18 +140,10 @@
|
||||||
<literal>minimum_version</literal> keywords can be
|
<literal>minimum_version</literal> keywords can be
|
||||||
combined.</para>
|
combined.</para>
|
||||||
|
|
||||||
<para>The <literal>type</literal> keyword can have four
|
<para>The <literal>type</literal> keyword can have three
|
||||||
values:</para>
|
values:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
|
||||||
<term>(no type specified)</term>
|
|
||||||
|
|
||||||
<listitem>
|
|
||||||
<para>The message is always displayed.</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><literal>install</literal></term>
|
<term><literal>install</literal></term>
|
||||||
|
|
||||||
|
@ -199,7 +191,7 @@
|
||||||
strings:</para>
|
strings:</para>
|
||||||
|
|
||||||
<programlisting>[
|
<programlisting>[
|
||||||
{
|
{ type: install
|
||||||
message: "Simple message"
|
message: "Simple message"
|
||||||
}
|
}
|
||||||
]</programlisting>
|
]</programlisting>
|
||||||
|
@ -219,7 +211,7 @@
|
||||||
as:</para>
|
as:</para>
|
||||||
|
|
||||||
<programlisting>[
|
<programlisting>[
|
||||||
{
|
{ type: install
|
||||||
message: <<EOM
|
message: <<EOM
|
||||||
Simple message
|
Simple message
|
||||||
EOM
|
EOM
|
||||||
|
@ -227,31 +219,6 @@ EOM
|
||||||
]</programlisting>
|
]</programlisting>
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
<example xml:id="porting-message-ucl-ex1">
|
|
||||||
<title>Always Display a Message</title>
|
|
||||||
|
|
||||||
<para>If a port has a <filename>pkg-message</filename>
|
|
||||||
containing simple text, it can be transformed into
|
|
||||||
<acronym>UCL</acronym> easily. Given this
|
|
||||||
<filename>pkg-message</filename>:</para>
|
|
||||||
|
|
||||||
<programlisting>* BIND requires configuration of rndc, including a "secret" key. *
|
|
||||||
* The easiest, and most secure way to configure rndc is to run *
|
|
||||||
* 'rndc-confgen -a' to generate the proper conf file, with a new *
|
|
||||||
* random key, and appropriate file permissions. *</programlisting>
|
|
||||||
|
|
||||||
<programlisting>[
|
|
||||||
{
|
|
||||||
message: <<EOD
|
|
||||||
* BIND requires configuration of rndc, including a "secret" key. *
|
|
||||||
* The easiest, and most secure way to configure rndc is to run *
|
|
||||||
* 'rndc-confgen -a' to generate the proper conf file, with a new *
|
|
||||||
* random key, and appropriate file permissions. *
|
|
||||||
EOD
|
|
||||||
}
|
|
||||||
]</programlisting>
|
|
||||||
</example>
|
|
||||||
|
|
||||||
<example xml:id="porting-message-ucl-ex2">
|
<example xml:id="porting-message-ucl-ex2">
|
||||||
<title>Display a Message on Install/Deinstall</title>
|
<title>Display a Message on Install/Deinstall</title>
|
||||||
|
|
||||||
|
@ -295,6 +262,14 @@ EOD
|
||||||
message: "Upgrading from > 1.0 and < 3.0 remove that file."
|
message: "Upgrading from > 1.0 and < 3.0 remove that file."
|
||||||
}
|
}
|
||||||
]</programlisting>
|
]</programlisting>
|
||||||
|
|
||||||
|
<important>
|
||||||
|
<para>When displaying a message on upgrade, it is important
|
||||||
|
to limit when it is being shown to the user. Most of the
|
||||||
|
time it is by using <literal>maximum_version</literal> to
|
||||||
|
limit its usage to upgrades from before a certain version
|
||||||
|
when something specific needs to be done.</para>
|
||||||
|
</important>
|
||||||
</example>
|
</example>
|
||||||
</sect2>
|
</sect2>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
Loading…
Reference in a new issue