Package Management

Greg T Hill greghill at terranova.net
Sat Jul 22 12:40:19 PDT 2000


I have been using installwatch to log all my "make install"'s.  This
creates a
funky looking logfile which is not particularly useful. Included with
installwatch
is a script "inst2rpm" which will prompt you for information about the
package and
create an rpm for you. However it is unforgiving of typos and if you
screw up you
have to start over.  This script contains a line which uses awk, grep,
egrep, sort,
etc  which parses the logfile generated by installwatch.  This line can
be cut and
put into a script which will take the logfile and generate a nice clean
list of all
files with pathnames  that were installed from a package by
installwatch. Such as:

audiofile-0.1.9.list:
/dev/tty
/opt/gnome/bin/audiofile-config
/opt/gnome/bin/sfconvert
/opt/gnome/bin/sfinfo
/opt/gnome/include/af_vfs.h
/opt/gnome/include/audiofile.h
/opt/gnome/include/aupvlist.h
/opt/gnome/lib/libaudiofile.a
/opt/gnome/lib/libaudiofile.la
/opt/gnome/lib/libaudiofile.so.0.0.0
/opt/gnome/share/aclocal/audiofile.m4

Testing if the file exists and is a regular file and then rewriting gets
rid of the
/dev/tty.  To uninstall, a short script to cat the file to a variable
and loop
through with rm.  Easy to create a bzipped tarfile of the package from
the list
also.  For those packages where you copy files from the source package,
a hand made
list will do.  Other utilities can be used to generate a list of what
the package
reqires, provides, add date of creation, etc.  From there it should be
fairly easy
too create a packagemanagement system  using only installwatch and other
scripts,
and the base LFS system,  with no need for RPM or any outside package
manager.  So
far all I have are some very short scripts, one which calls installwatch
and make
install and writes the log file with package name to a log directory,
one which
produces the cleaned up filelist from the logfile,  one which creates
the tar.bz2
of the installed package, and one which removes the installed package.
--
Mail archive: http://www.pcrdallas.com/mail-archives/lfs-discuss
IRC access: server: irc.linuxfromscratch.org port: 6667 channel: #LFS
Unsubscribe: email lfs-discuss-request at linuxfromscratch.org and put
"unsubscribe" (without the quotation marks) in the body of the message
(no subject is required)



More information about the lfs-dev mailing list