On Fri, 31 Jan 2003, Craig D. Jensen wrote:

>      Can someone give an example of a code snippet to include in a
>      .sec file to accommodate a user upgrading a package... without an
>      error such as "Can't create database 'databasename'. Database
>      exits".  No changes have been made to the database in the source.

That bit's easy; replace "create table" with "create table if not exists".

But you may not want to do this directly in your spec file - what if mysql 
is not running? 

Have a good look at how horde/turba/imp is configured in 5.6 - see
conf-{horde,turba,imp}-startup. We've fixed some bugs with initialising
and upgrading mysql databases in that release, and there's infrastructure 
in there to help do db initialisation for other packages, via mysql.init.

--
Charlie Brady                         [EMAIL PROTECTED]
Lead Product Developer
Network Server Solutions Group
Mitel Networks Corporation      http://www.mitel.com/smallbusiness
Phone: +1 (613) 592 5660 or 592 2122  Fax: +1 (613) 592 1175



--
Please report bugs to [EMAIL PROTECTED]
Please mail [EMAIL PROTECTED] (only) to discuss security issues
Support for registered customers and partners to [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Searchable archive at http://www.mail-archive.com/devinfo%40lists.e-smith.org

Reply via email to