@@ -10,10 +10,13 @@ use once_cell::sync::Lazy;
10
10
use regex:: Regex ;
11
11
use serde:: { Deserialize , Serialize } ;
12
12
use thiserror:: Error as ThisError ;
13
- use tracing:: info;
13
+ use tracing:: { info, warn } ;
14
14
15
15
use crate :: {
16
- config:: Cfg , currentprocess:: Process , errors:: RustupError , toolchain:: ToolchainName ,
16
+ config:: { dist_root_server, Cfg } ,
17
+ currentprocess:: Process ,
18
+ errors:: RustupError ,
19
+ toolchain:: ToolchainName ,
17
20
utils:: utils,
18
21
} ;
19
22
@@ -1166,9 +1169,20 @@ pub(crate) async fn dl_v2_manifest(
1166
1169
Ok ( Some ( ( manifest, manifest_hash) ) )
1167
1170
}
1168
1171
Err ( any) => {
1169
- if let Some ( RustupError :: ChecksumFailed { .. } ) = any. downcast_ref :: < RustupError > ( ) {
1170
- // Checksum failed - issue warning to try again later
1171
- info ! ( "update not yet available, sorry! try again later" )
1172
+ if let Some ( err @ RustupError :: ChecksumFailed { .. } ) =
1173
+ any. downcast_ref :: < RustupError > ( )
1174
+ {
1175
+ // Manifest checksum mismatched.
1176
+ warn ! ( "{err}" ) ;
1177
+
1178
+ let server = dist_root_server ( download. process ) ?;
1179
+ if server == DEFAULT_DIST_SERVER {
1180
+ // https://github.com/rust-lang/rustup/issues/3390
1181
+ info ! ( "this is likely due to an ongoing update of the official release server, please try again later" ) ;
1182
+ } else {
1183
+ // https://github.com/rust-lang/rustup/issues/3885
1184
+ info ! ( "this might indicate an issue with the third-party release server `{server}`" ) ;
1185
+ }
1172
1186
}
1173
1187
Err ( any)
1174
1188
}
0 commit comments