Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Apr 2007 15:12:53 -0500
From:      "Scot Hetzel" <swhetzel@gmail.com>
To:        "Ed Maste" <emaste@phaedrus.sandvine.ca>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: databases/unixODBC installs empty config files
Message-ID:  <790a9fff0704191312t704ad862odcd4b25801f5d1b8@mail.gmail.com>
In-Reply-To: <20070419153348.GA66904@sandvine.com>
References:  <20070419153348.GA66904@sandvine.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 4/19/07, Ed Maste <emaste@phaedrus.sandvine.ca> wrote:
> The unixODBC port installs an etc/odbc.ini file which wipes out
> an existing config on install of a new package.  (It's not even
> a sample config from the distribution; it's just an empty file
> created by virtue of existing in the plist it seems.)
>
> Can it just be removed from the plist:
>

You can't simply remove them from the plist, as those files (odbc.ini,
odbcinst.ini) are created by work/unixODBC-2.2.12/Makefile in the
install-data-am target.

What needs to be done is for that target to be patched in Makefile.in
or Makefile.am, so that it creates these files with a -dist or
-sample extension.  Then the pkg-plist can be changed as follows:

@unexec if cmp -s %D/etc/odbc.ini %D/etc/odbc.ini-dist; then  rm -f
%D/etc/odbc.ini; fi
etc/odbc.ini-dist
@exec [ -f %D/etc/odbc.ini] || cp %D/etc/odbc.ini-dist %D/etc/odbc.ini
@unexec if cmp -s %D/etc/odbcinst.ini %D/etc/odbcinst.ini-dist; then
rm -f %D/etc/odbc.ini; fi
etc/odbcinst.ini-dist
@exec [ -f %D/etc/odbcinst.ini] || cp %D/etc/odbcinst.ini-dist
%D/etc/odbcinst.ini

You'll also need to add a post-install target to the ports Makefile,
so that it will create the odbc.ini and odbcinst.ini files.

After you have made the changes, submit a PR with the patch and it
should get committed rather quickly.

Scot
--
DISCLAIMER:
No electrons were mamed while sending this message. Only slightly bruised.



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