07f22d708cefc4bc9f6d4147bc011fbc5147c5e5
hiram
  Fri Jul 24 14:24:28 2026 -0700
always write the alpha.hub.txt file refs #31811

diff --git src/hg/makeDb/doc/asmHubs/mkGenomes.pl src/hg/makeDb/doc/asmHubs/mkGenomes.pl
index 84d7cf0ec09..f715d5a45f6 100755
--- src/hg/makeDb/doc/asmHubs/mkGenomes.pl
+++ src/hg/makeDb/doc/asmHubs/mkGenomes.pl
@@ -122,41 +122,34 @@
         next if ( ! -d "${contribDir}" );
         my $contribTdb = "$contribDir/${contribTrack}.trackDb.txt";
         if ( -s "${contribTdb}" ) {
            my $tdb = `cat "${contribTdb}"`;
            chomp $tdb;
            $alphaTrackDb{$contribTrack} .= $tdb;
            ++$alphaCount;
         }
      }
      closedir($dh);
   }
   open (my $ph, ">", "$buildDir/public.hub.txt") or die "can not write to $buildDir/public.hub.txt";
   push @fhN, $ph;	# file 3
   open (my $bh, ">", "$buildDir/beta.hub.txt") or die "can not write to $buildDir/beta.hub.txt";
   push @fhN, $bh;	# file 4
-  # alpha.hub.txt is only needed when there are contrib tracks to show;
-  # otherwise the plain singleFile.hub.txt is sufficient, skip writing it.
-  # remove any stale alpha.hub.txt left over from a previous build where
-  # contrib tracks did exist.
-  my $ah;
-  if ($alphaCount > 0) {
-    open ($ah, ">", "$buildDir/alpha.hub.txt") or die "can not write to $buildDir/alpha.hub.txt";
+  # alpha.hub.txt is always written, even when there are no contrib tracks,
+  # so it exists in every build.
+  open (my $ah, ">", "$buildDir/alpha.hub.txt") or die "can not write to $buildDir/alpha.hub.txt";
   push @fhN, $ah;	# file 5
-  } elsif ( -e "$buildDir/alpha.hub.txt" ) {
-    unlink "$buildDir/alpha.hub.txt";
-  }
 
   my %liftOverChain;	# key is 'otherDb' name, value is bbi path
   my %liftOverGz;	# key is 'otherDb' name, value is lift.over.gz file path
   my $hasChainNets = `ls -d $buildDir/trackData/lastz.* 2> /dev/null | wc -l`;
   chomp $hasChainNets;
   if ($hasChainNets) {
     printf STDERR "# hasChainNets: %d\t%s\n", $hasChainNets, $asmId;
     open (my $CN, ">>", "hasChainNets.txt") or die "can not write to hasChainNets.txt";
     printf $CN "%s\t%d\n", $asmId, $hasChainNets;
     open (CH, "ls -d $buildDir/trackData/lastz.*|") or die "can not ls -d $buildDir/trackData/lastz.*";
     while (my $line = <CH>) {
       chomp $line;
       my $otherDb = basename($line);
       $otherDb =~ s/lastz.//;
       my $OtherDb = ucfirst($otherDb);