[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pre and post install targets
From: |
Ralf Wildenhues |
Subject: |
Re: pre and post install targets |
Date: |
Mon, 21 Jul 2008 20:51:01 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
* Jose-Marcio wrote on Mon, Jul 21, 2008 at 04:46:29PM CEST:
> Ralf Wildenhues wrote:
>>
>> upgrade:
>> $(MAKE) $(AM_MAKEFLAGS) preinstall
>> $(MAKE) $(AM_MAKEFLAGS) install
>> $(MAKE) $(AM_MAKEFLAGS) postinstall
> Only to let you know. Maybe other people have the same needs than me.
> There are two reasons I'm doing this.
>
> * My package uses a database library (BerkeleyDB). From time to time,
> data format changes. So, to install the new release, I need to dump
> the database using the **old version**, install the new version and
> recreate databases with the **new version**.
>
> * My software is a mail filter. This filter can be running on a busy
> server (handling, says, 10 or 20 messages per second). Downtime shall
> be minimized. The sequence of operations are : stop the MTA, stop the
> filter, make upgrade, restarts the filter and restarts the MTA. It's
> pratical and less error prone to have a single command to launch
> instead of typing all them. Either way, all this can be done with a
> small shell script.
Well, one reason I'm hesitant is that I think most such pre- or post-
actions are pretty system-dependent, more so than other tasks routinely
done in makefiles. For example, they would often depend on the type of
GNU/Linux distribution used, rather than only the config.guess triple.
This makes it more attractive to keep them in a separate file, as you
say a small shell script, or a debian/rules entry, or a .rpm stanza or
so.
Cheers,
Ralf