svn commit: r41106 - head/en_US.ISO8859-1/books/porters-handbook

Warren Block wblock at FreeBSD.org
Wed Mar 6 16:13:12 UTC 2013


Author: wblock
Date: Wed Mar  6 16:13:11 2013
New Revision: 41106
URL: http://svnweb.freebsd.org/changeset/doc/41106

Log:
  Add tip showing the use of pkg_version to test version number strings.
  Modified version of patch submitted by Frederic Culot with pkgng
  addition suggested by Jason Helfman.
  
  PR:		docs/176685
  Submitted by:	Frederic Culot <culot at FreeBSD.org>

Modified:
  head/en_US.ISO8859-1/books/porters-handbook/book.xml

Modified: head/en_US.ISO8859-1/books/porters-handbook/book.xml
==============================================================================
--- head/en_US.ISO8859-1/books/porters-handbook/book.xml	Wed Mar  6 16:02:19 2013	(r41105)
+++ head/en_US.ISO8859-1/books/porters-handbook/book.xml	Wed Mar  6 16:13:11 2013	(r41106)
@@ -1025,6 +1025,27 @@ DOS2UNIX_REGEX=	.*\.(c|cpp|h)</programli
 	    incorrectly treated as a newer version since 20000801 is a
 	    numerically greater value than 1).</para>
 
+	  <tip>
+	    <para>The results of version number comparisons are not
+	      always obvious.  &man.pkg.version.1; can be used to test
+	      the comparison of two version number strings.  The
+	      <application>pkgng</application> equivalent is
+	      <command>pkg version -t</command>.  For example:</para>
+
+	    <screen>&prompt.user; <userinput>pkg_version -t 0.031 0.29</userinput>
+></screen>
+
+	    <para>Or, for <application>pkgng</application>
+	      users:</para>
+
+	    <screen>&prompt.user; <userinput>pkg version -t 0.031 0.29</userinput>
+></screen>
+
+	    <para>The <literal>></literal> output indicates that
+	      version 0.031 is considered greater than version 0.29,
+	      which may not have been obvious to the porter.</para>
+	  </tip>
+
 	  <para>In situations such as this, the
 	    <makevar>PORTEPOCH</makevar> version should be increased.
 	    If <makevar>PORTEPOCH</makevar> is nonzero it is appended


More information about the svn-doc-all mailing list