Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Jun 2012 21:38:21 +0100
From:      Chris Rees <crees@FreeBSD.org>
To:        Adam Strohl <adams-freebsd@ateamsystems.com>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: Retro-actively adjust port's deinstall operations?
Message-ID:  <CADLo83_mS-dncCPLKr8D_vc1gKUW87Ue0kpHJNFkW0Eb2hYFJw@mail.gmail.com>
In-Reply-To: <4FD50115.1070904@ateamsystems.com>
References:  <4FD50115.1070904@ateamsystems.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 10 June 2012 21:18, Adam Strohl <adams-freebsd@ateamsystems.com> wrote:
> Hello,
>
> I've just submitted a PR to update the CouchDB port from 1.1.0 to 1.2.0:
> http://www.freebsd.org/cgi/query-pr.cgi?pr=3D168923
>
> Background: CouchDB's local.ini file stores all overridden options and
> default.ini the defaults, similar to /etc/rc.conf & /etc/defaults/rc.conf=
.
>
> While updating the port I discovered that the existing port lists local.i=
ni
> directly in pkg-plist instead of installing a local.ini.sample file and
> doing proper comparisons/tests for changes. =A0So it blindly removes this=
 file
> on deinstall.
>
> If my diff in the above PR is accepted when people uninstall the existing
> 1.1.0 port it will remove their config file. =A0The new port will see tha=
t
> there is no local.ini and copy in the sample for them but this is really
> awful for obvious reasons.
>
> Is there a way to reach people with a warning about this _before_ they
> uninstall/reinstall so they can back up the file before upgrading?
>
> Or is /usr/ports/UPDATING it? (and do I need to do anything special to ha=
ve
> this listed there?)

I'm sorry, you're rather stuffed there.  The same happened with a port
I took over a while ago.

Actually if the older version doesn't install a .sample file (as it
doesn't), you could put a big warning in for it:

.include <bsd.port.pre.mk>

.if exists(${PREFIX}/whateverconfigfile) &&
!exists(${PREFIX}/whateverconfigfile.sample)
IGNORE=3D  Please see UPDATING note {date}
.endif

Stick a note in UPDATING (perhaps like 20110815), and send a HEADSUP to por=
ts@:

BEFORE you deinstall couchdb, make sure you take a backup of
default.ini, because the port will clobber it.

I've grabbed your PR and will investigate tomorrow.

Chris



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADLo83_mS-dncCPLKr8D_vc1gKUW87Ue0kpHJNFkW0Eb2hYFJw>