From harry_newton@telinco.co.uk  Thu May  2 16:05:44 2002
Return-Path: <harry_newton@telinco.co.uk>
Received: from smarthost-1.mail.telinco.net (smarthost-1.mail.telinco.net [212.1.128.90])
	by hub.freebsd.org (Postfix) with ESMTP id 8B0AF37B417
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  2 May 2002 16:05:43 -0700 (PDT)
Received: from dial-212-1-136-177.access.uk.tiscali.com ([212.1.136.177] helo=basilisk.locus)
	by smarthost-1.mail.telinco.net with esmtp (Exim 3.22 #1)
	id 173Pdt-000DRf-00
	for FreeBSD-gnats-submit@freebsd.org; Fri, 03 May 2002 00:05:41 +0100
Received: (from harry@localhost)
	by basilisk.locus (8.11.6/8.11.6) id g42N2xd61725;
	Fri, 3 May 2002 00:02:59 +0100 (BST)
	(envelope-from harry)
Message-Id: <200205022302.g42N2xd61725@basilisk.locus>
Date: Fri, 3 May 2002 00:02:59 +0100 (BST)
From: Harry Newton <harry_newton@telinco.co.uk>
Reply-To: Harry Newton <harry_newton@telinco.co.uk>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Minor correxion to FreeBSD Porter's Handbook
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         37693
>Category:       docs
>Synopsis:       Minor correxion to FreeBSD Porter's Handbook
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 02 16:10:01 PDT 2002
>Closed-Date:    Tue Feb 11 15:53:39 PST 2003
>Last-Modified:  Tue Feb 11 15:53:39 PST 2003
>Originator:     Harry Newton
>Release:        FreeBSD 4.5-STABLE i386
>Organization:
Gaudeamus
>Environment:
System: FreeBSD basilisk.locus 4.5-STABLE FreeBSD 4.5-STABLE #0: Sat Mar 16 20:08:45 GMT 2002 harry@basilisk.locus:/usr/obj/usr/src/sys/BASILISK i386


>Description:
A couple of mistakes / clarifications in Chapter 17, The FreeBSD Porter's
Handbook 'Automated package list creation'.

 - Don't need to touch pkg-plist beforehand, in fact unless the >> operator
is used, this will give an error later on.

 - small grammatical mistake ( 'into' missing )

 - comm(1) requires input lines to be lexigraphically sorted, otherwise the
command doesn't work as expected. Failure to sort causes extra lines of the
@dirrm sort to be added to the packing list.

>How-To-Repeat:
	Refer to Chapter 17 of FreeBSD Porter's Handbook

>Fix:

--- book.sgml	Thu May  2 23:43:55 2002
+++ book.sgml_original	Thu May  2 23:33:29 2002
@@ -3878,18 +3878,20 @@
       <title>Automated package list creation</title>
 
       <para>First, make sure your port is almost complete, with only
-        <filename>pkg-plist</filename> missing.</para>
+        <filename>pkg-plist</filename> missing.  Create an empty
+        <filename>pkg-plist</filename>.</para>
 
-      <para>Next, create a temporary set of directories into which
-        your port can be installed, and install any
-        dependencies.</para>
+      <screen>&prompt.root; <userinput>touch pkg-plist</userinput></screen>
+
+      <para>Next, create a new set of directories which your port can be
+        installed, and install any dependencies.</para>
 
       <screen>&prompt.root; <userinput>mtree -U -f /etc/mtree/BSD.local.dist -d -e -p /var/tmp/<replaceable>port-name</replaceable></userinput>
 &prompt.root; <userinput>make depends PREFIX=/var/tmp/<replaceable>port-name</replaceable></userinput></screen>
 
       <para>Store the directory structure in a new file.</para>
 
-      <screen>&prompt.root; <userinput>(cd /var/tmp/<replaceable>port-name</replaceable> && find -d * -type d) | sort - &gt; OLD-DIRS</userinput></screen>
+      <screen>&prompt.root; <userinput>(cd /var/tmp/<replaceable>port-name</replaceable> && find -d * -type d) &gt; OLD-DIRS</userinput></screen>
 
       <para>If your port honors <makevar>PREFIX</makevar> (which it should)
         you can then install the port and create the package list.</para>
@@ -3900,7 +3902,7 @@
       <para>You must also add any newly created directories to the packing
         list.</para>
 
-      <screen>&prompt.root; <userinput>(cd /var/tmp/<replaceable>port-name</replaceable> && find -d * -type d) | sort - | comm -13 OLD-DIRS - | sed -e 's#^#@dirrm #' &gt;&gt; pkg-plist</userinput></screen>
+      <screen>&prompt.root; <userinput>(cd /var/tmp/<replaceable>port-name && find -d * -type d) | comm -13 OLD-DIRS - | sed -e 's#^#@dirrm #' &gt;&gt; pkg-plist</replaceable></userinput></screen>
 
       <para>Finally, you need to tidy up the packing list by hand; it isn't
         <emphasis>all</emphasis> automated.  Manual pages should be listed in



>Release-Note:
>Audit-Trail:

From: Giorgos Keramidas <keramida@freebsd.org>
To: Harry Newton <harry_newton@telinco.co.uk>
Cc: bug-followup@freebsd.org
Subject: Re: docs/37693: Minor correxion to FreeBSD Porter's Handbook
Date: Sat, 11 May 2002 11:58:16 +0300

 On 2002-05-03 00:02, Harry Newton wrote:
 > --- book.sgml	Thu May  2 23:43:55 2002
 > +++ book.sgml_original	Thu May  2 23:33:29 2002
 > @@ -3878,18 +3878,20 @@
 >        <title>Automated package list creation</title>
 >
 >        <para>First, make sure your port is almost complete, with only
 > -        <filename>pkg-plist</filename> missing.</para>
 > +        <filename>pkg-plist</filename> missing.  Create an empty
 > +        <filename>pkg-plist</filename>.</para>
 
 You could probably expand this a bit, saying why an empty pkg-plist is
 needed.  This change seems fine though.
 
 > -      <para>Next, create a temporary set of directories into which
 > -        your port can be installed, and install any
 > -        dependencies.</para>
 > +      <screen>&prompt.root; <userinput>touch pkg-plist</userinput></screen>
 > +
 > +      <para>Next, create a new set of directories which your port can be
 > +        installed, and install any dependencies.</para>
 
 The new text is probably wrong too.  How about something like:
 
 	<para>Then, create a new set of directories where your port
 	  can be installed, and install any dependencies.</para>
 
 > -      <screen>&prompt.root; <userinput>(cd /var/tmp/<replaceable>port-name</replaceable> && find -d * -type d) | sort - &gt; OLD-DIRS</userinput></screen>
 > +      <screen>&prompt.root; <userinput>(cd /var/tmp/<replaceable>port-name</replaceable> && find -d * -type d) &gt; OLD-DIRS</userinput></screen>
 
 You are removing a `sort -' command here.  Why?  I think I have seen
 commits in ports that were done with messages like:
 
 	Sort plist.
 
 I'm not sure this is a good thing to change.
 
 > -      <screen>&prompt.root; <userinput>(cd /var/tmp/<replaceable>port-name</replaceable> && find -d * -type d) | sort - | comm -13 OLD-DIRS - | sed -e 's#^#@dirrm #' &gt;&gt; pkg-plist</userinput></screen>
 > +      <screen>&prompt.root; <userinput>(cd /var/tmp/<replaceable>port-name && find -d * -type d) | comm -13 OLD-DIRS - | sed -e 's#^#@dirrm #' &gt;&gt; pkg-plist</replaceable></userinput></screen>
 
 Not everything is replaceable.  The <replaceable> element must
 surround things that can be thrown away in their entirety and replaced
 with whatever the user feels like.  By marking it all as replaceable
 you are effectively encouraging the reader to throw away a major part
 of the command :)
 
 - Giorgos
 

From: Ceri Davies <setantae@submonkey.net>
To: Harry Newton <harry_newton@telinco.co.uk>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: docs/37693: Minor correxion to FreeBSD Porter's Handbook
Date: Sun, 9 Jun 2002 12:21:00 +0100

 On Fri, May 03, 2002 at 12:02:59AM +0100, Harry Newton wrote:
 > 
 > >Fix:
 > 
 > --- book.sgml	Thu May  2 23:43:55 2002
 > +++ book.sgml_original	Thu May  2 23:33:29 2002
 > @@ -3878,18 +3878,20 @@
 >        <title>Automated package list creation</title>
 >  
 >        <para>First, make sure your port is almost complete, with only
 > -        <filename>pkg-plist</filename> missing.</para>
 > +        <filename>pkg-plist</filename> missing.  Create an empty
 > +        <filename>pkg-plist</filename>.</para>
 
 This patch is reversed, isn't it ?
 
 Ceri
 
 -- 
 you can't see when light's so strong
 you can't see when light is gone

From: Giorgos Keramidas <keramida@ceid.upatras.gr>
To: Ceri Davies <setantae@submonkey.net>
Cc: bug-followup@FreeBSD.ORG
Subject: Re: docs/37693: Minor correxion to FreeBSD Porter's Handbook
Date: Wed, 12 Jun 2002 01:11:21 +0300

 On 2002-06-09 04:30 -0700, Ceri Davies wrote:
 > On Fri, May 03, 2002 at 12:02:59AM +0100, Harry Newton wrote:
 > > 
 > > >Fix:
 > > 
 > > --- book.sgml	Thu May  2 23:43:55 2002
 > > +++ book.sgml_original	Thu May  2 23:33:29 2002
 
 >  This patch is reversed, isn't it ?
 
 Yes.  I noticed after I sent my post, that I could not apply this.
 Then Harry kindly pointed me to the fact that it was reversed (notice
 how book.sgml_original is listed as the second filename).
 
 - Giorgos
 
State-Changed-From-To: open->closed 
State-Changed-By: tom 
State-Changed-When: Tue Feb 11 15:53:00 PST 2003 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=37693 
>Unformatted:
