Bug 37693

Summary: Minor correxion to FreeBSD Porter's Handbook
Product: Documentation Reporter: harry_newton <harry_newton>
Component: Books & ArticlesAssignee: freebsd-doc (Nobody) <doc>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description harry_newton 2002-05-03 00:10:01 UTC
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
Comment 1 Giorgos Keramidas freebsd_committer freebsd_triage 2002-05-11 09:58:16 UTC
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
Comment 2 setantae 2002-06-09 12:21:00 UTC
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
Comment 3 Giorgos Keramidas 2002-06-11 23:11:21 UTC
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
Comment 4 Tom Hukins freebsd_committer freebsd_triage 2003-02-11 23:53:00 UTC
State Changed
From-To: open->closed

Committed, thanks!