Pascal Terjan wrote:

>Christian Belisle a �crit :
>
>>Pascal Terjan wrote:
>>
>>>When updating php mysql and openldap here is what happens:
>>>
>>[...]
>>
>>>Coudn't you avoid restarting apache agter each RPM ? I don't know RPM
>>>mechanisms so I don't know if it can be done...
>>>
>>No, the only way we could do that is to remove the httpd restart from
>>packages, but php & extensions need it.
>>
>>Chris
>>
>
>OK
>I thought about that way to do it faster next time:
>/etc/rc.d/init.d/httpd stop && urpmi -a php && /etc/rc.d/init.d/httpd
>start
>
>But it's stupid because my apache is stopped during all the download ;)
>The best thing would be:
>- Download all the packages
>- Stop Apache
>- Install the packages
>- Start Apache
>
>But I can't see any way of doing it with urpmi :(
>
Not a problem in urpmi but at problem in rpm, but yes you could make a 
hack in urpmi
to make it work:

Add tag to all postinstall scripts that only need to be run once pr 
install session,
ie.
if [ !-f /etc/urpmi/smartinstall ] then
   if [ -e /usr/sbin/AESctl ]; then /usr/sbin/AESctl update;fi 
#ONCE:APACHE_RL
fi
At install time, fish out scripts, cut all lines with #ONCE:.ID, and 
group/uniq by ID.
and after last package run the scripts.

One could extend the concept at litlle more to include execute order, 
but i don't think
it's needed.

Simple and easy.

Regards
Troels Liebe Bentsen.


Reply via email to