Add two examples of pkg version -t usage inside examples.

Sponsored by:	Absolight
This commit is contained in:
Mathieu Arnold 2017-12-04 16:30:25 +00:00
parent 22253d8275
commit d79cb93f86
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=51255

View file

@ -290,7 +290,11 @@ DISTVERSION= 1.2-pre4</programlisting>
DISTVERSION= 1.2p4</programlisting>
<para>Both will generate a <varname>PORTVERSION</varname> of
<literal>1.2.p4</literal>.</para>
<literal>1.2.p4</literal> which is before than 1.2.
&man.pkg-version.8; can be used to check that fact:</para>
<screen>&prompt.user; <userinput>pkg version -t 1.2.p4 1.2</userinput>
&lt;</screen>
</example>
<example xml:id="makefile-versions-ex4">
@ -309,7 +313,27 @@ PORTVERSION= 1.2p4</programlisting>
<para>In this case, using <varname>DISTVERSION</varname> is
not possible because it would generate a version of
<literal>1.2.p4</literal> which would be before
<literal>1.2</literal> and not after.</para>
<literal>1.2</literal> and not after. &man.pkg-version.8;
will verify this:</para>
<screen>&prompt.user; <userinput>pkg version -t 1.2 1.2.p4</userinput>
&gt; <co xml:id="makefile-versions-ex4-co1"/>
&prompt.user; <userinput>pkg version -t 1.2 1.2p4</userinput>
&lt; <co xml:id="makefile-versions-ex4-co2"/></screen>
<calloutlist>
<callout arearefs="makefile-versions-ex4-co1">
<para><literal>1.2</literal> is after
<literal>1.2.p4</literal>, which is
<emphasis>wrong</emphasis> in this case.</para>
</callout>
<callout arearefs="makefile-versions-ex4-co2">
<para><literal>1.2</literal> is before
<literal>1.2p4</literal>, which is what was
needed.</para>
</callout>
</calloutlist>
</example>
<para>For some more advanced examples of setting