94164e1121bb557b2791a0ae29a58bb14944ad4e
jcasper
  Tue Sep 17 16:19:17 2024 -0700
Making sure to repair tables before hiding tracks in GBiC update/install steps, refs #34469

diff --git src/product/installer/browserSetup.sh src/product/installer/browserSetup.sh
index 9206cfa..d555787 100644
--- src/product/installer/browserSetup.sh
+++ src/product/installer/browserSetup.sh
@@ -1859,34 +1859,34 @@
 
     for db in $DBS; do
        echo2 Downloading Mysql files for mysql database $db
        $RSYNC $minRsyncOpt --exclude=* --progress -avp $RSYNCOPTS $HGDOWNLOAD::mysql/$db/ $MYSQLDIR/$db/ 
        chown -R $MYSQLUSER:$MYSQLUSER $MYSQLDIR/$db
     done
 
     echo2 Copying hgFixed.trackVersion, required for most tracks
     $RSYNC --progress -avp $RSYNCOPTS $HGDOWNLOAD::mysql/hgFixed/trackVersion.* $MYSQLDIR/hgFixed/ 
     echo2 Copying hgFixed.refLink, required for RefSeq tracks across all species
     $RSYNC --progress -avp $RSYNCOPTS $HGDOWNLOAD::mysql/hgFixed/refLink.* $MYSQLDIR/hgFixed/
     chown -R $MYSQLUSER:$MYSQLUSER $MYSQLDIR/hgFixed
 
     startMysql
 
-    hideSomeTracks
-
     mysqlCheck
 
+    hideSomeTracks
+
     echo2 
     echo2 The mirror should be functional now. It contains some basic assembly tables 
     echo2 and will download missing data from the UCSC servers. This requires
     echo2 two open ports, outgoing, TCP, from this machine:
     echo2 - to genome-mysql.soe.ucsc.edu, port 3306, to load MySQL tables
     echo2 - to hgdownload.soe.ucsc.edu, port 80, to download non-MySQL data files
     echo2 - or the above two servers European counterparts:
     echo2   genome-euro-mysql.soe.ucsc.edu and hgdownload-euro.soe.ucsc.edu
     echo2
     showMyAddress
     goOnline
 }
 
 function checkDownloadUdr () 
 {
@@ -1943,30 +1943,32 @@
    echo updating GBDB: $DBS
    for db in $DBS; do 
        echo2 syncing gbdb: $db
        rsync -avp $RSYNCOPTS $HGDOWNLOAD::gbdb/$db/ $GBDBDIR/$db/ 
    done
 
    # update the mysql DBs
    stopMysql
    DBS=`ls /var/lib/mysql/ | egrep -v '(Trash$)|(hgTemp)|(^ib_)|(^ibdata)|(^aria)|(^mysql)|(performance)|(.flag$)|(multi-master.info)|(sys)|(lost.found)|(hgcentral)'`
    for db in $DBS; do 
        echo2 syncing full mysql database: $db
        $RSYNC --update --progress -avp $RSYNCOPTS $HGDOWNLOAD::mysql/$db/ $MYSQLDIR/$db/
    done
    startMysql
 
+   mysqlCheck
+
    hideSomeTracks
 
    echo2 update finished
 }
 
 function addTools {
    rsync -avP hgdownload.soe.ucsc.edu::genome/admin/exe/linux.x86_64/ /usr/local/bin/
    rm -rf /usr/local/bin/blat.tmp # in case an old one is still there
    mv /usr/local/bin/blat /usr/local/bin/blat.tmp # tools under the BLAT license are separated into their own directory
    mv /usr/local/bin/blat.tmp/* /usr/local/bin/
    rmdir /usr/local/bin/blat.tmp
    echo2 The UCSC User Tools were copied to /usr/local/bin
    echo2 Please note that most of the tools require an .hg.conf file in the users
    echo2 home directory. A very minimal .hg.conf file can be found here:
    echo2 "http://genome-source.soe.ucsc.edu/gitlist/kent.git/blob/master/src/product/minimal.hg.conf"