
boklm pushed to branch maint-14.5 at The Tor Project / Applications / tor-browser-build Commits: 6abd378b by Nicolas Vigier at 2025-05-16T11:54:26+02:00 Bug 41449: Add prefix to update-responses xml files - - - - - 20fbc1d8 by Nicolas Vigier at 2025-05-16T11:54:30+02:00 Bug 41451: Add missing no-update.xml redirects We were doing a foreach loop on versions when writing the per OS .htaccess, always writing to the same .htacess file, meaning only the last one was kept. However the version number is only used for the no-update.xml redirect, so we move the loop there, to have a no-update.xml for each version. - - - - - 0542d0ec by Nicolas Vigier at 2025-05-16T11:54:40+02:00 Bug 41452: Skip update-responses xml files for versions which don't have incremental - - - - - 1 changed file: - tools/update-responses/update_responses Changes: ===================================== tools/update-responses/update_responses ===================================== @@ -408,10 +408,12 @@ sub write_responses { my $versions_str = join('+', @$versions); foreach my $os (keys %oses) { my $resp = get_response($config, $versions, $os); - write_htdocs($channel, $os, "$versions_str-$os.xml", $resp); + write_htdocs($channel, $os, "update-$versions_str-$os.xml", $resp); foreach my $from_version (keys %from_versions) { + next unless grep { + $config->{versions}{$_}{files}{$os}{partial}{$from_version} } @$versions; $resp = get_response($config, $versions, $os, $from_version); - write_htdocs($channel, $os, "$from_version-$versions_str-$os.xml", $resp); + write_htdocs($channel, $os, "update-$from_version-$versions_str-$os.xml", $resp); } write_htdocs($channel, $os, 'no-update.xml', '<?xml version="1.0" encoding="UTF-8"?>' @@ -443,18 +445,19 @@ sub write_htaccess { } } } - foreach my $version (@$versions) { - my $files = $config->{versions}{$version}{files}; - foreach my $os (sort keys %oses) { - my $htaccess_os = "RewriteEngine On\n"; + foreach my $os (sort keys %oses) { + my $htaccess_os = "RewriteEngine On\n"; + foreach my $version (@$versions) { $htaccess_os .= "RewriteRule ^$version/ no-update.xml [last]\n"; - foreach my $from_version (sort keys %from_versions) { - $htaccess_os .= "RewriteRule ^$from_version/ " - . "$from_version-$versions_str-$os.xml [last]\n"; - } - $htaccess_os .= "RewriteRule ^[^\/]+/ $versions_str-$os.xml [last]\n"; - write_htdocs($channel, $os, '.htaccess', $htaccess_os); } + foreach my $from_version (sort keys %from_versions) { + next unless grep { + $config->{versions}{$_}{files}{$os}{partial}{$from_version} } @$versions; + $htaccess_os .= "RewriteRule ^$from_version/ " + . "update-$from_version-$versions_str-$os.xml [last]\n"; + } + $htaccess_os .= "RewriteRule ^[^\/]+/ update-$versions_str-$os.xml [last]\n"; + write_htdocs($channel, $os, '.htaccess', $htaccess_os); } } View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/compare/e... -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/compare/e... You're receiving this email because of your account on gitlab.torproject.org.
participants (1)
-
boklm (@boklm)