[packaging] [Bug 2676] New: Run database upgrade conditionally

Kolab Bugzilla noreply at kolab.org
Thu Dec 12 18:55:35 CET 2013


            Bug ID: 2676
           Summary: Run database upgrade conditionally
    Classification: Kolab Server
           Product: Kolab Server
           Version: N/A
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: packaging - rpm - redhat
          Assignee: vanmeeuwen at kolabsys.com
          Reporter: wickert at kolabsys.com
        QA Contact: packaging-bugs at lists.kolabsys.com
            Blocks: 2419
       Ticket Type: enhancement

Roundcube's postinstall script runs:

/usr/share/roundcubemail/bin/updatedb.sh \
    --dir /usr/share/doc/roundcubemail-1.0/SQL/ \
    --package roundcube || : \
    >/dev/null 2>&1

The database upgrade should only be run conditionally, and there are several
options how to achieve this.

1. Only on package upgrades (means when the number of roundcubemail packages
while running %post is > 1):

if [ $1 -gt 1 ] ; then

2. Only if the database actually exists. A simple check is something like:

if mysql -p$passwd -e "use roundcubemail" > /dev/null 2>&1 ; then

3. If mysql is running

I wonder if it's better to move this to %posttrans anyway... 1. option will no
longer work, but it's not needed anymore. Unsure if EL5 understands

You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kolabsys.com/pipermail/packaging-bugs/attachments/20131212/f776d5e6/attachment.htm>

More information about the packaging-bugs mailing list