Hello all, I have a source package that generates multiple binary packages. Since the packages are similar in a lot of ways (config file structure, handling of config files, etc), I have a lot of functions that are the same in several maintainer scripts. Ideally, I would like to split them out into a common_functions file, and source it each time, instead of having lots of redundant code lying around. So, the binary packages include a -base, that all of the others using maintainer scripts Depend on.I know that I can source the common functions file in the postinst of all the other packages besides -base (and likely in -base as well, since by postinst it should be unpacked, right)? My question is: can I source it in config as well? I suspect not, because of the preconfigure run that apt does. I suppose if I really wanted to do this, I could exit 0 at preconfigure time, and only run it at configure, but that seems wrong to me. The second question is (on a completely unrelated note): is there any problem with assuming the presence of a color capable $TERM, and is anything likely to break if I do? I have seen other linuces that use coloration in init.d scripts for success and failure, and I thought it looked kind of cool. Since it's easy, I was thinking about doing it in the binary packages, but I wanted to ask if it was a bad idea first. Thanks all, -- ----------------------------------------------------------------- | ,''`. Stephen Gran | | : :' : sgran@debian.org | | `. `' Debian user, admin, and developer | | `- http://www.debian.org | -----------------------------------------------------------------
Attachment:
pgpxBIP71yDnN.pgp
Description: PGP signature