BEWARE upgrading Horde System

Alexander Leidinger Alexander at Leidinger.net
Mon Apr 10 12:56:01 UTC 2006


Thierry Thomas <thierry at freebsd.org> wrote:

> Le Lun 10 avr 06 à  1:41:59 +0200, Marc G. Fournier <scrappy at hub.org>
>  écrivait :

>> You've missed the 3rd, and optimal, option: on initial install, install
>> the config files based on the .dist files, but *do not* overwrite an
>> existing config file (ie. after an upgrade) ...
>
> If you want the package to install these files, they must be registered
> in pkg-plist, and then they will be deinstalled.

Several ports already handle this situation. There's some "plist  
magic" which does a "@exec [ -e x ] || cp x.dist x" (or something like  
this, I didn't looked it up) and a "@unexec cmp x.dist x <appropriate  
conditional> rm x".

So it makes a copy to the config file from the .dist one on  
installation and removes the config if it is equal to the .dist one on  
deinstallation. It may be the case that you have to do the same thing  
in the port Makefile too (when @exec isn't executed when installing  
from source). Another alternative would be a pkg-(de)install script  
which handles the removal in the pre-deinstall case and the copy in  
the post-install case.

While we're discussing the horde upgrade... is there some trick to run  
the 3.0 to 3.1 history migration script or is my php setup fucked-up  
in the CLI (for the apache module case everything is setup in  
httpd.conf, no php.ini) case (I get some error messages about not  
being able to include pear.php or something like this... I don't have  
the error messages at hand)?

Bye,
Alexander.

-- 
http://www.Leidinger.net  Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org     netchild @ FreeBSD.org  : PGP ID = 72077137
  Leela: Your face can take a lot of punishment. That's good to know.
  Fry: There's a lot about my face you don't know.




More information about the freebsd-ports mailing list