Bug 176685

Summary: porters-handbook: add a tip related to PORTEPOCH
Product: Documentation Reporter: Frederic Culot <culot>
Component: Books & ArticlesAssignee: Warren Block <wblock>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
book.xml.diff none

Description Frederic Culot freebsd_committer freebsd_triage 2013-03-06 13:30:04 UTC
I believe the tip mentioned in the attached patch could be of some help
to junior porters as it saves them the need to dive into bsd.port.mk
to learn how the check for ports versions going backwards is done.

Regards,
Frederic
Comment 1 Warren Block freebsd_committer freebsd_triage 2013-03-06 13:54:36 UTC
Responsible Changed
From-To: freebsd-doc->wblock

Take.
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-03-06 16:13:24 UTC
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
_______________________________________________
svn-doc-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-doc-all
To unsubscribe, send any mail to "svn-doc-all-unsubscribe@freebsd.org"
Comment 3 Warren Block freebsd_committer freebsd_triage 2013-03-06 16:13:30 UTC
State Changed
From-To: open->closed

Modified version of patch committed, thanks!