[Index] [About]  
Author Simes
Created:  2005-11-18
Last changed:  2005-11-18
[Root]  [Prev] [Idx] [Next] http://www.bpfh.net/computing/software/pkg-tools/templates.html 

Using templates

Introduction

Version 1.2 of pkg-tools has brought templated package control scripts into being. The reason for this was simple; I had been maintaining a gaggle of functions which could do things like add entries to the default PATH variables, place files under rcs control, add entries to /etc/syslog.conf, etc.

Over time I found that maintain all of the various package control scripts with up to date versions of the functions was quite time consuming so I decided to do something about this. There are two different ways this problem could be solved:

Both methods have their advantages, however I prefer the build a complete package control script which doesn't rely on any other code. Whilst you do have to maintain all of the packages with up to date versions of the master template file, this can be easily scripted. However putting the code to be used onto the systems themselves means that you have to do lots of work with the end systems if you update the master funxtion file.

Using the system

I've tried to make the system as easily to use as possible:

For new packages...

With new packages you can just take the following route:

% simple-proj
% build-pkg ...

The call to simple-proj creating the InstallPackage directory with the default postinstall.template and postremove.template files pulled from /usr/local/lib/pkg-tools/simple-proj/std.

For existing packages...

Existing datastream packages can be updated by just calling the update-pkg script, assuming that you're in a directory which has a InstallPackage directory within it which contains suitable template files for the package concerned.

[Root]  [Prev] [Idx] [Next] http://www.bpfh.net/computing/software/pkg-tools/templates.html 
 [Index] [About] Powered by WML
Author Simes
Created:  2005-11-18
Last changed:  2005-11-18
 
More by the same author Comments? EMail webmaster@bpfh.net
 
© Simes