cff0a237099d06f16896ec781a85cccb1a663849 braney Mon Dec 21 14:21:59 2020 -0800 make sure that trackDb cache on hubs keeps track of files that are included in the trackDb.txt file diff --git src/hg/lib/trackHub.c src/hg/lib/trackHub.c index d9e1f60..3aa637f 100644 --- src/hg/lib/trackHub.c +++ src/hg/lib/trackHub.c @@ -1074,36 +1074,37 @@ // mark the containers by setting their subtracks pointer markContainers(hub, genome, tdbList); /* Loop through list checking tags */ struct trackDb *tdb; for (tdb = tdbList; tdb != NULL; tdb = tdb->next) { validateOneTrack(hub, genome, tdb); // clear these two pointers which we set in markContainers tdb->subtracks = NULL; tdb->parent = NULL; } } -struct trackDb *trackHubTracksForGenome(struct trackHub *hub, struct trackHubGenome *genome) +struct trackDb *trackHubTracksForGenome(struct trackHub *hub, struct trackHubGenome *genome, struct dyString *incFiles) /* Get list of tracks associated with genome. Check that it only is composed of legal - * types. Do a few other quick checks to catch errors early. */ + * types. Do a few other quick checks to catch errors early. If incFiles is not NULL, + * put the list of included files in there. */ { struct lineFile *lf = udcWrapShortLineFile(genome->trackDbFile, NULL, MAX_HUB_TRACKDB_FILE_SIZE); -struct trackDb *tdbList = trackDbFromOpenRa(lf, NULL); +struct trackDb *tdbList = trackDbFromOpenRa(lf, NULL, incFiles); lineFileClose(&lf); char *tabMetaName = hashFindVal(genome->settingsHash, "metaTab"); char *absTabName = NULL; if (tabMetaName) absTabName = trackHubRelativeUrl(hub->url, tabMetaName); char *tagStormName = hashFindVal(genome->settingsHash, "metaDb"); char *absStormName = NULL; if (tagStormName) absStormName = trackHubRelativeUrl(hub->url, tagStormName); /* Make bigDataUrls more absolute rather than relative to genome.ra dir */ struct trackDb *tdb; for (tdb = tdbList; tdb != NULL; tdb = tdb->next) @@ -1291,31 +1292,31 @@ } } } void trackHubFindPos(struct cart *cart, char *db, char *term, struct hgPositions *hgp) /* Look for term in track hubs. Update hgp if found */ { struct trackDb *tdbList = NULL; if (trackHubDatabase(db)) { struct trackHubGenome *genome = trackHubGetGenome(db); - tdbList = trackHubTracksForGenome(genome->trackHub, genome); + tdbList = trackHubTracksForGenome(genome->trackHub, genome, NULL); } else tdbList = hubCollectTracks(db, NULL); findBigBedPosInTdbList(cart, db, tdbList, term, hgp, NULL); } boolean trackHubGetPcrParams(char *database, char **pHost, char **pPort) /* Get the isPcr params from a trackHub genome. */ { char *hostPort; hostPort = trackHubAssemblyField(database, "isPcr"); if (hostPort == NULL)