From culot@FreeBSD.org  Tue Aug  6 08:52:31 2013
Return-Path: <culot@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id CBE34A9
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  6 Aug 2013 08:52:31 +0000 (UTC)
	(envelope-from culot@FreeBSD.org)
Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id A99B520B1
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  6 Aug 2013 08:52:31 +0000 (UTC)
Received: from freefall.freebsd.org (localhost [127.0.0.1])
	by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r768qVbr018845
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 6 Aug 2013 08:52:31 GMT
	(envelope-from culot@freefall.freebsd.org)
Received: (from culot@localhost)
	by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r768qVur018843;
	Tue, 6 Aug 2013 08:52:31 GMT
	(envelope-from culot)
Message-Id: <201308060852.r768qVur018843@freefall.freebsd.org>
Date: Tue, 6 Aug 2013 08:52:31 GMT
From: Frederic Culot <culot@FreeBSD.org>
Reply-To: Frederic Culot <culot@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: porters-handbook: mention PLIST_DIRSTRY
X-Send-Pr-Version: 3.114
X-GNATS-Notify:

>Number:         181080
>Category:       docs
>Synopsis:       porters-handbook: mention PLIST_DIRSTRY
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    wblock
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 06 09:00:00 UTC 2013
>Closed-Date:    Mon Sep 02 18:22:08 UTC 2013
>Last-Modified:  Mon Sep  2 18:30: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 r253323: Sat Jul 13 18:26:21 UTC 2013 peter@freefall.freebsd.org:/usr/obj/usr/src/sys/FREEFALL amd64
>Description:
The PLIST_DIRSTRY macro is nowhere to be found in the porters-handbook,
so I propose this simple patch to mention it alongside PLIST_DIRS.

Thanks,
Frederic
>How-To-Repeat:
>Fix:

--- porters-handbook.diff begins here ---
Index: book.xml
===================================================================
--- book.xml	(revision 42499)
+++ book.xml	(working copy)
@@ -9930,20 +9930,25 @@
 	<filename><makevar>TMPPLIST</makevar></filename>.</para>
 
       <para>Another possibility to modify port's packing list is based
-	on setting the variables <makevar>PLIST_FILES</makevar> and
-	<makevar>PLIST_DIRS</makevar>.  The value of each variable is
+	on setting the variables <makevar>PLIST_FILES</makevar>,
+	<makevar>PLIST_DIRS</makevar>, and
+	<makevar>PLIST_DIRSTRY</makevar>.  The value of each variable is
 	regarded as a list of pathnames to write to
 	<filename><makevar>TMPPLIST</makevar></filename> along with
 	<filename><makevar>PLIST</makevar></filename> contents.  Names
-	listed in <makevar>PLIST_FILES</makevar> and
-	<makevar>PLIST_DIRS</makevar> are subject to
+	listed in <makevar>PLIST_FILES</makevar>,
+	<makevar>PLIST_DIRS</makevar>, and
+	<makevar>PLIST_DIRSTRY</makevar> are subject to
 	<literal>%%<replaceable>VAR</replaceable>%%</literal>
 	substitution, as described above.  Except for that, names from
 	<makevar>PLIST_FILES</makevar> will appear in the final
-	packing list unchanged, while <literal>@dirrm</literal> will
-	be prepended to names from <makevar>PLIST_DIRS</makevar>.  To
-	take effect, <makevar>PLIST_FILES</makevar> and
-	<makevar>PLIST_DIRS</makevar> must be set before
+	packing list unchanged, while <literal>@dirrm</literal> and
+	<literal>@dirrmtry</literal> will
+	be prepended to names from <makevar>PLIST_DIRS</makevar>
+	and <makevar>PLIST_DIRSTRY</makevar>, respectively.  To
+	take effect, <makevar>PLIST_FILES</makevar>,
+	<makevar>PLIST_DIRS</makevar>, and
+	<makevar>PLIST_DIRSTRY</makevar> must be set before
 	<filename><makevar>TMPPLIST</makevar></filename> is written,
 	i.e., in <maketarget>pre-install</maketarget> or
 	earlier.</para>
@@ -10071,8 +10076,9 @@
 	<filename>pkg-plist</filename> file (with or without variable
 	substitution), or embedded into the
 	<filename>Makefile</filename> via
-	<makevar>PLIST_FILES</makevar> and
-	<makevar>PLIST_DIRS</makevar>.  Even if the contents are
+	<makevar>PLIST_FILES</makevar>,
+	<makevar>PLIST_DIRS</makevar>, and
+	<makevar>PLIST_DIRSTRY</makevar>.  Even if the contents are
 	auto-generated by a tool or a target in the Makefile
 	<emphasis>before</emphasis> the inclusion into the Ports
 	Collection by a committer, this is still considered a static
--- porters-handbook.diff ends here ---


>Release-Note:
>Audit-Trail:

From: Frederic Culot <culot@FreeBSD.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/181080: porters-handbook: mention PLIST_DIRSTRY
Date: Sun, 1 Sep 2013 07:22:08 +0000

 --d6Gm4EdcadzBjdND
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 Following an off-list feedback from Warren (wblock@) I submit this
 updated patch which adds a note explaining into a bit more detail
 what PLIST_DIRSTRY is used for.
 
 This note is added right after the first PLIST_DIRS appearence and
 gives a link to the section where the @dirrm and @dirrmtry macros
 are explained, so I believe the reader is now able to grasp the
 meaning of PLIST_DIRSTRY more easily.
 
 However, adding an example of the PLIST_DISTRY usage was not deemed
 necessary as it is pretty straightforward to extrapolate the already
 existing PLIST_DIRS example for PLIST_DIRSTRY.
 
 Feel free to ping me in case you have any comments related to this
 updated patch, and thanks again Warren for your feedback.
 
 Cheers,
 Frederic
 
 --d6Gm4EdcadzBjdND
 Content-Type: text/x-diff; charset=us-ascii
 Content-Disposition: attachment; filename="porters-handbook.diff"
 
 Index: book.xml
 ===================================================================
 --- book.xml	(revision 42606)
 +++ book.xml	(working copy)
 @@ -278,6 +278,20 @@
  	<para>Of course, <makevar>PLIST_DIRS</makevar> should be left
  	  unset if a port installs no directories of its own.</para>
  
 +	<note>
 +	  <para>It is possible that several ports share a common
 +	    directory. In that case
 +	    <makevar>PLIST_DIRS</makevar> should be replaced by
 +	    <makevar>PLIST_DIRSTRY</makevar> so that the directory
 +	    is removed only if empty, otherwise it is silently
 +	    ignored. <makevar>PLIST_DIRS</makevar> and
 +	    <makevar>PLIST_DIRSTRY</makevar> are equivalent to
 +	    using <literal>@dirrm</literal> and
 +	    <literal>@dirrmtry</literal> in
 +	    <filename>pkg-plist</filename>, which are described in
 +	    <xref linkend="plist-dir-cleaning"/>.</para>
 +	</note>
 +
  	<para>The price for this way of listing port's files and
  	  directories is that you cannot use command sequences
  	  described in &man.pkg.create.1;.  Therefore, it is suitable
 @@ -9918,20 +9932,25 @@
  	<filename><makevar>TMPPLIST</makevar></filename>.</para>
  
        <para>Another possibility to modify port's packing list is based
 -	on setting the variables <makevar>PLIST_FILES</makevar> and
 -	<makevar>PLIST_DIRS</makevar>.  The value of each variable is
 +	on setting the variables <makevar>PLIST_FILES</makevar>,
 +	<makevar>PLIST_DIRS</makevar>, and
 +	<makevar>PLIST_DIRSTRY</makevar>.  The value of each variable is
  	regarded as a list of pathnames to write to
  	<filename><makevar>TMPPLIST</makevar></filename> along with
  	<filename><makevar>PLIST</makevar></filename> contents.  Names
 -	listed in <makevar>PLIST_FILES</makevar> and
 -	<makevar>PLIST_DIRS</makevar> are subject to
 +	listed in <makevar>PLIST_FILES</makevar>,
 +	<makevar>PLIST_DIRS</makevar>, and
 +	<makevar>PLIST_DIRSTRY</makevar> are subject to
  	<literal>%%<replaceable>VAR</replaceable>%%</literal>
  	substitution, as described above.  Except for that, names from
  	<makevar>PLIST_FILES</makevar> will appear in the final
 -	packing list unchanged, while <literal>@dirrm</literal> will
 -	be prepended to names from <makevar>PLIST_DIRS</makevar>.  To
 -	take effect, <makevar>PLIST_FILES</makevar> and
 -	<makevar>PLIST_DIRS</makevar> must be set before
 +	packing list unchanged, while <literal>@dirrm</literal> and
 +	<literal>@dirrmtry</literal> will
 +	be prepended to names from <makevar>PLIST_DIRS</makevar>
 +	and <makevar>PLIST_DIRSTRY</makevar>, respectively.  To
 +	take effect, <makevar>PLIST_FILES</makevar>,
 +	<makevar>PLIST_DIRS</makevar>, and
 +	<makevar>PLIST_DIRSTRY</makevar> must be set before
  	<filename><makevar>TMPPLIST</makevar></filename> is written,
  	i.e., in <maketarget>pre-install</maketarget> or
  	earlier.</para>
 @@ -10059,8 +10078,9 @@
  	<filename>pkg-plist</filename> file (with or without variable
  	substitution), or embedded into the
  	<filename>Makefile</filename> via
 -	<makevar>PLIST_FILES</makevar> and
 -	<makevar>PLIST_DIRS</makevar>.  Even if the contents are
 +	<makevar>PLIST_FILES</makevar>,
 +	<makevar>PLIST_DIRS</makevar>, and
 +	<makevar>PLIST_DIRSTRY</makevar>.  Even if the contents are
  	auto-generated by a tool or a target in the Makefile
  	<emphasis>before</emphasis> the inclusion into the Ports
  	Collection by a committer, this is still considered a static
 
 --d6Gm4EdcadzBjdND--
Responsible-Changed-From-To: freebsd-doc->wblock 
Responsible-Changed-By: wblock 
Responsible-Changed-When: Mon Sep 2 18:19:10 UTC 2013 
Responsible-Changed-Why:  
Take. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=181080 
State-Changed-From-To: open->closed 
State-Changed-By: wblock 
State-Changed-When: Mon Sep 2 18:21:44 UTC 2013 
State-Changed-Why:  
Slightly edited version of second diff committed.  Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/181080: commit references a PR
Date: Mon,  2 Sep 2013 18:21:39 +0000 (UTC)

 Author: wblock
 Date: Mon Sep  2 18:21:26 2013
 New Revision: 42608
 URL: http://svnweb.freebsd.org/changeset/doc/42608
 
 Log:
   Mention PLIST_DIRSTRY.  Committed version is slightly edited from the
   second diff in the PR.
   
   PR:		 docs/181080
   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	Sun Sep  1 22:36:52 2013	(r42607)
 +++ head/en_US.ISO8859-1/books/porters-handbook/book.xml	Mon Sep  2 18:21:26 2013	(r42608)
 @@ -278,6 +278,19 @@ PLIST_DIRS=	lib/X11/oneko</programlistin
  	<para>Of course, <makevar>PLIST_DIRS</makevar> should be left
  	  unset if a port installs no directories of its own.</para>
  
 +	<note>
 +
 +	  <para>Several ports can share a common directory.  In that
 +	    case, <makevar>PLIST_DIRS</makevar> should be replaced by
 +	    <makevar>PLIST_DIRSTRY</makevar> so that the directory is
 +	    removed only if empty, otherwise it is silently ignored.
 +	    <makevar>PLIST_DIRS</makevar> and
 +	    <makevar>PLIST_DIRSTRY</makevar> are equivalent to using
 +	    <literal>@dirrm</literal> and <literal>@dirrmtry</literal>
 +	    in <filename>pkg-plist</filename>, as described in
 +	    <xref linkend="plist-dir-cleaning"/>.</para>
 +	</note>
 +
  	<para>The price for this way of listing port's files and
  	  directories is that you cannot use command sequences
  	  described in &man.pkg.create.1;.  Therefore, it is suitable
 @@ -9917,21 +9930,26 @@ PLIST_SUB+=	X11="@comment "
  	<maketarget>post-install</maketarget> to a file named
  	<filename><makevar>TMPPLIST</makevar></filename>.</para>
  
 -      <para>Another possibility to modify port's packing list is based
 -	on setting the variables <makevar>PLIST_FILES</makevar> and
 -	<makevar>PLIST_DIRS</makevar>.  The value of each variable is
 +      <para>Another way of modifying a port's packing list is based
 +	on setting the variables <makevar>PLIST_FILES</makevar>,
 +	<makevar>PLIST_DIRS</makevar>, and
 +	<makevar>PLIST_DIRSTRY</makevar>.  The value of each variable is
  	regarded as a list of pathnames to write to
  	<filename><makevar>TMPPLIST</makevar></filename> along with
  	<filename><makevar>PLIST</makevar></filename> contents.  Names
 -	listed in <makevar>PLIST_FILES</makevar> and
 -	<makevar>PLIST_DIRS</makevar> are subject to
 +	listed in <makevar>PLIST_FILES</makevar>,
 +	<makevar>PLIST_DIRS</makevar>, and
 +	<makevar>PLIST_DIRSTRY</makevar> are subject to
  	<literal>%%<replaceable>VAR</replaceable>%%</literal>
 -	substitution, as described above.  Except for that, names from
 +	substitution as described above.  Except for that, names from
  	<makevar>PLIST_FILES</makevar> will appear in the final
 -	packing list unchanged, while <literal>@dirrm</literal> will
 -	be prepended to names from <makevar>PLIST_DIRS</makevar>.  To
 -	take effect, <makevar>PLIST_FILES</makevar> and
 -	<makevar>PLIST_DIRS</makevar> must be set before
 +	packing list unchanged, while <literal>@dirrm</literal> and
 +	<literal>@dirrmtry</literal> will
 +	be prepended to names from <makevar>PLIST_DIRS</makevar>
 +	and <makevar>PLIST_DIRSTRY</makevar>, respectively.  To
 +	take effect, <makevar>PLIST_FILES</makevar>,
 +	<makevar>PLIST_DIRS</makevar>, and
 +	<makevar>PLIST_DIRSTRY</makevar> must be set before
  	<filename><makevar>TMPPLIST</makevar></filename> is written,
  	i.e., in <maketarget>pre-install</maketarget> or
  	earlier.</para>
 @@ -10059,8 +10077,9 @@ etc/orbit.conf.sample
  	<filename>pkg-plist</filename> file (with or without variable
  	substitution), or embedded into the
  	<filename>Makefile</filename> via
 -	<makevar>PLIST_FILES</makevar> and
 -	<makevar>PLIST_DIRS</makevar>.  Even if the contents are
 +	<makevar>PLIST_FILES</makevar>,
 +	<makevar>PLIST_DIRS</makevar>, and
 +	<makevar>PLIST_DIRSTRY</makevar>.  Even if the contents are
  	auto-generated by a tool or a target in the Makefile
  	<emphasis>before</emphasis> the inclusion into the Ports
  	Collection by a committer, this is still considered a static
 _______________________________________________
 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:
