<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../general.ent">
  %general-entities;
]>

<sect1 id="ch06-updatebook">
  <title>Update the book</title>
  <?dbhtml filename="updatebook.html"?>

  <para>When you're going to update the book by adding a new package to it,
    here's how you do it:</para>

  <itemizedlist>

    <listitem><para>Assign yourself to the ticket for this new package.</para>
    </listitem>

    <listitem><para>Test build an LFS system to make sure this package compiles
      properly in an LFS environment. Don't use your regular workstation's
      environment - it may be sufficiently different for the compilation to
      abort.  A package may depend on something that you have installed but
      which doesn't come with the LFS-Book. Also keep in mind that some packages
      are used twice, in chapter 5 and in chapter 6.</para>
    </listitem>

    <listitem><para>Update the installation instructions in the book, if
      necessary.</para>
    </listitem>

    <listitem><para>When the package compiles properly and the package works too
      (doesn't seg. fault or show other errors when trying to execute programs
      from it), then open the <filename>entities/general.ent</filename> in
      an editor.</para>
    </listitem>

    <listitem><para>Find the <emphasis>package-version</emphasis> entity and
      update its value to the new version.</para>
    </listitem>

	<listitem><para>Update the list of files installed by the new version of the
      package.  This can be trivially gathered by using <command>find</command>
      immediately prior to and immediately after installing the new version and
      <command>diff</command>ing the output.</para>
    </listitem>

    <listitem><para>We now prefer to use the package's native format (so that md5sums
      or signatures can be checked) instead of creating a .tar.bz2 if the package is
      supplied only in .tar.gz.  The maintenance of package versions on the LFS mirrors
      is handled separately, and there is no longer a need to copy new versions of
      packages to your home directory.  Run <userinput>ls -l package-version.tar.{bz2,gz}
      </userinput> on the source tarball. Divide the filesize by <emphasis>1024</emphasis>
      to get the number of Kilobytes. Round off to the nearest Kilobyte and update the
      <emphasis>package-size</emphasis> entity.</para>
    </listitem>
  </itemizedlist>
</sect1>
