Package Management

Jeremy Huntwork jhuntwork at
Wed Feb 27 15:18:16 PST 2008

Gerard Beekmans wrote:
> For LFS purposes we first need to determine how far we want to take 
> package management. In its utmost basic form we can provide commands in 
> the book to collect a list of installed files before and after the 
> installation of a package. Compare the two lists with a program like 
> 'diff', some post-processing to clean up the results, and voila, a file 
> you can later on loop through 'rm' to remove the just installed files.

Because PM can be a complex and varied subject, I would suggest that we 
start small. Start with a POC LFS that employs DESTDIR and a _very 
simple_ way to package. The two main initial goals might be:

1. Know what files have been installed by the package and where they 
were installed.

2. Store the compiled package for possible use on another system.

It would be very easy to accomplish that with tar only:

make DESTDIR=/tmp/package install
cd /tmp/package
tar -cjf package.tar.bz2 ./
tar -tf package.tar.bz2 >/var/packagedata/package
cd /
tar -xf /tmp/package/package.tar.bz2

The above commands could probably be condensed even further or made 
slightly more robust, but it should demonstrate how easy it is to keep 
track of installed files.

As we develop the idea further, and we wish include educational points 
in LFS about more advanced concepts of Package Management, we could 
bring in other features.


More information about the lfs-dev mailing list