From culot@FreeBSD.org  Wed Mar  6 13:23:04 2013
Return-Path: <culot@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	by hub.freebsd.org (Postfix) with ESMTP id 5A27CA32
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  6 Mar 2013 13:23:04 +0000 (UTC)
	(envelope-from culot@FreeBSD.org)
Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87])
	by mx1.freebsd.org (Postfix) with ESMTP id 44B17A1C
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  6 Mar 2013 13:23:04 +0000 (UTC)
Received: from freefall.freebsd.org (localhost [127.0.0.1])
	by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r26DN4pQ087188
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 6 Mar 2013 13:23:04 GMT
	(envelope-from culot@freefall.freebsd.org)
Received: (from culot@localhost)
	by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r26DN4sv087187;
	Wed, 6 Mar 2013 13:23:04 GMT
	(envelope-from culot)
Message-Id: <201303061323.r26DN4sv087187@freefall.freebsd.org>
Date: Wed, 6 Mar 2013 13:23:04 GMT
From: Frederic Culot <culot@FreeBSD.org>
Reply-To: Frederic Culot <culot@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: porters-handbook: add a tip related to PORTEPOCH
X-Send-Pr-Version: 3.114
X-GNATS-Notify:

>Number:         176685
>Category:       docs
>Synopsis:       porters-handbook: add a tip related to PORTEPOCH
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    wblock
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 06 13:30:04 UTC 2013
>Closed-Date:    Wed Mar 06 16:13:54 UTC 2013
>Last-Modified:  Wed Mar  6 16:20:00 UTC 2013
>Originator:     Frederic Culot
>Release:        FreeBSD 10.0-CURRENT amd64
>Organization:
FreeBSD
>Environment:
System: FreeBSD freefall.freebsd.org 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r247807: Mon Mar 4 19:35:47 UTC 2013 peter@freefall.freebsd.org:/usr/obj/usr/src/sys/FREEFALL amd64
>Description:
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
>How-To-Repeat:
>Fix:
--- book.xml.diff begins here ---
Index: book.xml
===================================================================
--- book.xml	(revision 41102)
+++ book.xml	(working copy)
@@ -1025,6 +1025,19 @@
 	    incorrectly treated as a newer version since 20000801 is a
 	    numerically greater value than 1).</para>
 
+	  <tip>
+	    <para>In some cases comparing versions is not that
+	      straightforward and &man.pkg.version.1; could be helpful
+	      to test a pair of version number strings. For example:
+	    </para>
+
+	    <screen>&prompt.root; <userinput>pkg_version -t 0.031 0.29</userinput></screen>
+
+	    <para>indicates that version 0.031 is to be considered
+	      greater than version 0.29, which is not obvious at
+	      first.</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
--- book.xml.diff ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-doc->wblock 
Responsible-Changed-By: wblock 
Responsible-Changed-When: Wed Mar 6 13:54:36 UTC 2013 
Responsible-Changed-Why:  
Take. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=176685 
State-Changed-From-To: open->closed 
State-Changed-By: wblock 
State-Changed-When: Wed Mar 6 16:13:30 UTC 2013 
State-Changed-Why:  
Modified version of patch committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=176685 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/176685: commit references a PR
Date: Wed,  6 Mar 2013 16:13:24 +0000 (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"
 
>Unformatted:
