Monday, September 15, 2008

Package management revisited

In chapter 6 of the lfs book there is a debate about Package Management. The "timestamp based" method has some drawbacks, but since I am determined to build with jhalfs, and since jhalfs keeps logs of each installation, I certainly would not mind having a list of installed files in the logs. It is my intention that there will be just 1 package building at any particular time, in sequence, one after another. In addition, I plan that disk writing will be restricted durring builds to activities in my homedir, such as browsing the internet, or reading the blfs book. The "timestamp based" method may be helpful in determining where files came from and whether they are still needed, or what files may be involved if a repair or upgrade is needed.

To implement the "timestamp based" lists of files in the logs, I made a few changes to some of the files mentioned in trying blfs-tool with custom-tools. These are some patches showing what changes were made, plus a new file:

Makefile_custom_files.diff
remake_custom_files.diff
makefile-custom-functions

There is a new line added to Makefile.custom to include makefile-custom-functions.
There are 4 lines added to remake_custom.sh which involve touching a timestamp-marker file and then checking what files were changed or created since the timestamp-marker was touched. The function called log_new_files_2 was added to the new file makefile-custom-functions. There was already a similar function called log_new_files in makefile-functions, but it didn't let me get quite as much control as I wanted. What I wanted was the ability to exclude certain areas from the "search" -- areas where changes often occur for reasons other than installation.

There is also a project called install-log that is mentioned in an unmaintained lfs package management hint. The version 1.4 is a shell script. The version 1.9 is a c program.

On another front, I am working on a script that at the moment is called WHAT_PACKAGES. This is for asking some questions about packages that have been installed on the system, usually by jhalfs, and have an indicator file in the tracking directory /var/lib/jhalfs/BLFS.
Some of the questions answered so far are:
WHAT_PACKAGES
WHAT_PACKAGES up_to_date
WHAT_PACKAGES not_up_to_date
WHAT_PACKAGES not_up_to_date recommended
WHAT_PACKAGES [pkg_names] recommended
WHAT_PACKAGES [pkg_names] recommended recursive

The recursive is an attempt to see dependencies plus dependencies of dependencies. It takes longer to run though.

The script WHAT_PACKAGES must be run from within ~/blfs_root. The word recommended causes it to show the recommended dependencies for each [pkg_names] or all listed in /var/lib/jhalfs/BLFS, if no package was named.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

Click blog title for the latest post