af07fb8909257db7da2b2d6258cca204f53a0daf
angie
  Fri Apr 17 12:53:17 2015 -0700
Libified hdb.c's trackDataAccessible for use in hgTrackDb, to add support for bigDataUrl-only tracks in -strict mode.
Also added a check for existence of file, if bigDataUrl is a file instead of a URL.
It would be good to further require in hgTrackDb that for bigDataUrl-based tracks,
tdb must also have a release tag in order to prevent /gbdb/ tracks from sneaking from
hgwbeta to RR -- but by the time pruneStrict is called, pruneRelease has already
removed the release tag!
More investigation required to see whether it's OK to call pruneStrict earlier.
refs #14379 #15059

diff --git src/hg/inc/hdb.h src/hg/inc/hdb.h
index dc260c2..39e52e7 100644
--- src/hg/inc/hdb.h
+++ src/hg/inc/hdb.h
@@ -477,30 +477,36 @@
 
 boolean hIsBrowserbox();
 /* Return TRUE if this is the browserbox virtual machine */
 
 boolean hIsPreviewHost(void);
 /* Return TRUE if this is running on preview web-server.  The preview
  * server is a mirror of the development server provided for public
  * early access. */
 
 char *hBrowserName();
 /* Return browser name based on host name */
 
 boolean hTrackOnChrom(struct trackDb *tdb, char *chrom);
 /* Return TRUE if track exists on this chromosome. */
 
+boolean trackDataAccessible(char *database, struct trackDb *tdb);
+/* Return TRUE if underlying data are accessible - meaning the track has either
+ * a bigDataUrl with remote URL (http:// etc), a bigDataUrl with an existing local file,
+ * or a database table with the same name.
+ * Note: this returns FALSE for composite tracks; use this on subtracks or simple tracks. */
+
 struct trackDb *trackDbPolishAfterLinkup(struct trackDb *tdbList, char *db);
 /* Do various massaging that can only be done after parent/child
  * relationships are established. */
 
 struct trackDb *hTrackDb(char *db);
 /* Load tracks associated with current db.
  * Supertracks are loaded as a trackDb, but are not in the returned list,
  * but are accessible via the parent pointers of the member tracks.  Also,
  * the supertrack trackDb subtrack fields are not set here (would be
  * incompatible with the returned list)
  * Returns list sorted by priority
  *	NOTE: this result is cached, do not free it !
  */
 
 struct trackDb *tdbForTrack(char *db, char *track,struct trackDb **tdbList);