On 11/25/05, Gerard Beekmans <[EMAIL PROTECTED]> wrote:
> Jeremy's idea of using portions of that hint has merit, but I agree the
> hint as-is isn't suitable for the book.

I was going to post something along similar lines. I have it sitting
in my Drafts folder, so will just cut-n-paste it.

I would like to propose using the DESTDIR approach to install packages
in LFS. The installation steps for most packages are as follows:
  tar -xvzf $pkg-$ver.tar.bz2 &&
  cd $pkg-$ver &&
  ./configure --prefix=/usr &&
  make &&
  make DESTDIR=/var/tmp/$pkg-$ver &&
  cd $pkg-$ver &&
   tar cf - . | (cd / ; tar xf - )

There are multiple advantages that this offers compared to the current
way of installing directly into the final destination:
* Provides a rudimentary package manager without need for additional tools.
* This is how the major distros do it, so it is a well tested alternative.
* This will allow users to upgrade packages in place (i.e. even when
they are currently in use).
* It allows manipulating the installed files before they are relocated
to their final destination. This will make the patches that can never
be sent upstream (such as coreutils-remove-XXX.patches redundant).
* Provide a clear distinction between installation and
post-installation configuration. Currently (and this is especially
true for GNOME in BLFS), removing packages can leave the system in an
inconsistent state. With the DESTDIR based approach, two additional
sub-sections can be added: post-install-config and
post-removal-config. This is especially useful for folks using the
pkg-user approach (an approach that the book recommends) of pkg
management.
* It teaches folks more about creating a distribution (not just
installing packages), which IMO is the purpose of LFS.

Disadvantages:
* It makes the instructions slightly more complex.
* Causes problems for folks who don't want a package manager.

What do other LFSers think?

--
Tushar Teredesai
   mailto:[EMAIL PROTECTED]
   http://www.linuxfromscratch.org/~tushar/
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to