bd0a18827dcd91e4fae812f795e2a39968535627
braney
  Thu Jan 21 16:52:04 2021 -0800
when building beta or public, check on hgwbeta and hgw0 for files referenced by bigDataUrl rather than
assuming that they exist if they exist on dev

diff --git src/hg/makeDb/hgTrackDb/hgTrackDb.c src/hg/makeDb/hgTrackDb/hgTrackDb.c
index 5c736a3..b6a1c12 100644
--- src/hg/makeDb/hgTrackDb/hgTrackDb.c
+++ src/hg/makeDb/hgTrackDb/hgTrackDb.c
@@ -41,45 +41,49 @@
   "  trackDb.sql  - SQL definition of the table to create, typically from\n"
   "               - the source tree file: src/hg/lib/trackDb.sql\n"
   "               - the table name in the CREATE statement is replaced by the\n"
   "               - table name specified on this command line.\n"
   "  hgRoot - a directory name to prepend to org to locate the hierarchy:\n"
   "           hgRoot/trackDb.ra - top level trackDb.ra file processed first\n"
   "           hgRoot/org/trackDb.ra - second level file processed second\n"
   "           hgRoot/org/database/trackDb.ra - third level file processed last\n"
   "         - for no directory hierarchy use .\n"
   "  -strict - only include tables that exist (and complain about missing html files).\n"
   "  -raName=trackDb.ra - Specify a file name to use other than trackDb.ra\n"
   "   for the ra files.\n"
   "  -release=alpha|beta|public - Include trackDb entries with this release tag only.\n"
   "  -settings - for trackDb scanning, output table name, type line,\n"
   "            -  and settings hash to stderr while loading everything."
+  "  -remoteLogin - use remote login to check for the existence of bigDataUrl files\n"
   );
 }
 
 static struct optionSpec optionSpecs[] = {
     {"raName", OPTION_STRING},
     {"strict", OPTION_BOOLEAN},
     {"release", OPTION_STRING},
     {"settings", OPTION_BOOLEAN},
+    {"remoteLogin", OPTION_STRING},
     {NULL,      0}
 };
 
 static char *raName = "trackDb.ra";
 
 static char *release = "alpha";
 
+static char *remoteLogin = NULL;
+
 // release tags
 #define RELEASE_ALPHA  (1 << 0)
 #define RELEASE_BETA   (1 << 1)
 #define RELEASE_PUBLIC (1 << 2)
 
 unsigned releaseBit = RELEASE_ALPHA;
 
 static bool showSettings = FALSE;
 
 static boolean hasNonAsciiChars(char *text)
 /* Check if text has any non-printing or non-ascii characters */
 {
 char *c;
 for (c = text; *c != '\0'; c++)
     {
@@ -112,31 +116,31 @@
  * them alive. */
 {
 struct trackDb *newList = NULL, *tdb, *next;
 for (tdb = tdbList; tdb != NULL; tdb = next)
     {
     next = tdb->next;
     verbose(3,"pruneStrict checking track: '%s'\n", tdb->track);
     if (tdb->subtracks != NULL)
 	{
 	tdb->subtracks = pruneStrict(tdb->subtracks, db);
 	}
     if (tdb->subtracks != NULL)
         {
 	slAddHead(&newList, tdb);
 	}
-    else if (trackDataAccessible(db, tdb) || tdbIsDownloadsOnly(tdb))
+    else if (tdbIsDownloadsOnly(tdb) || trackDataAccessibleRemote(db, tdb, remoteLogin)) 
         {
         slAddHead(&newList, tdb);
         }
     // We will allow these at some point, but currently(10/10/2011) the table browser still chokes.
     //else if (trackDbSetting(tdb, "bigDataUrl") != NULL)
     //    {
     //    slAddHead(&newList, tdb);
     //    }
     else
 	verbose(3,"pruneStrict removing track: '%s' no table %s\n", tdb->track, tdb->table);
     }
 slReverse(&newList);
 return newList;
 }
 
@@ -897,19 +901,20 @@
 return 0;  /* make compiler happy */
 }
 
 int main(int argc, char *argv[])
 /* Process command line. */
 {
 optionInit(&argc, argv, optionSpecs);
 if (argc != 6)
     usage();
 raName = optionVal("raName", raName);
 showSettings = optionExists("settings");
 if (strchr(raName, '/') != NULL)
     errAbort("-raName value should be a file name without directories");
 release = optionVal("release", release);
 releaseBit = getReleaseBit(release);
+remoteLogin = optionVal("remoteLogin", remoteLogin);
 
 hgTrackDb(argv[1], argv[2], argv[3], argv[4], argv[5], optionExists("strict"));
 return 0;
 }