Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Mar 2013 16:13:12 +0000 (UTC)
From:      Warren Block <wblock@FreeBSD.org>
To:        doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org
Subject:   svn commit: r41106 - head/en_US.ISO8859-1/books/porters-handbook
Message-ID:  <201303061613.r26GDCu9081628@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@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>&gt;</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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303061613.r26GDCu9081628>