Date: Mon, 4 Dec 2017 16:30:25 +0000 (UTC) From: Mathieu Arnold <mat@FreeBSD.org> To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r51255 - head/en_US.ISO8859-1/books/porters-handbook/makefiles Message-ID: <201712041630.vB4GUPhd083293@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mat Date: Mon Dec 4 16:30:25 2017 New Revision: 51255 URL: https://svnweb.freebsd.org/changeset/doc/51255 Log: Add two examples of `pkg version -t` usage inside examples. Sponsored by: Absolight Modified: head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml Modified: head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml Mon Dec 4 04:16:21 2017 (r51254) +++ head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml Mon Dec 4 16:30:25 2017 (r51255) @@ -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> +<</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> +> <co xml:id="makefile-versions-ex4-co1"/> +&prompt.user; <userinput>pkg version -t 1.2 1.2p4</userinput> +< <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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712041630.vB4GUPhd083293>