BEWARE upgrading Horde System

Marc G. Fournier scrappy at hub.org
Mon Apr 10 17:35:29 UTC 2006


On Mon, 10 Apr 2006, Thierry Thomas wrote:

> Le Lun 10 avr 06 à  1:41:59 +0200, Marc G. Fournier <scrappy at hub.org>
> écrivait :
>>> I had choosen the first method, because I thought it was easier for the
>>> OP this way, and I think that a port should do better than a manual
>>> installation.
>>
>> 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.

Huh?  You do it in the Makefile here:

.for FILE in ${CONFFILE}
         @if [ ! -f ${CONFDIR}/${FILE} ]; then \
           ${CP} ${CONFDIR}/${FILE}.dist ${CONFDIR}/${FILE} ; \
         fi
.endfor

Which is *perfect* ... *If* there is no config file already, then copy the 
.dist one that comes with Horde over ... what is wrong is that later, in 
files/pkg-install.in, you go one step further and say "*If* there is a 
config file there, then move that one out of the way and replace it with 
the .dist one":

            for cf in `ls %%HORDEDIR%%/config/*php`; do
                 if [ -f $cf.previous ]; then
                     mv $cf $cf.new
                     echo "--->   $cf not installed ***"
                     echo "--->       please copy from $cf.previous ***"
                     echo "--->                or from $cf.new      ***"
                 fi
             done

Its that second one that I have a problem with ...

----
Marc G. Fournier           Hub.Org Networking Services (http://www.hub.org)
Email: scrappy at hub.org           Yahoo!: yscrappy              ICQ: 7615664


More information about the freebsd-ports mailing list