mirror of
https://github.com/RubyMetric/chsrc.git
synced 2025-03-10 12:35:17 +08:00
parent
e65a16c009
commit
245f0ed5d5
@ -579,6 +579,17 @@ get_max_ele_idx_in_dbl_ary (double *array, int size)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 默认上游源时不测速的,该函数改变该行为,测速上游源
|
||||
*/
|
||||
void
|
||||
chsrc_set_measure_upstream (char *url)
|
||||
{
|
||||
SpeedMeasureInfo_t *upsmi = &UpstreamProvider.smi;
|
||||
upsmi->skip = NotSkip;
|
||||
upsmi->url = url;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param sources 所有待测源
|
||||
* @param size 待测源的数量
|
||||
|
@ -64,6 +64,8 @@ pl_ruby_setsrc (char *option)
|
||||
{
|
||||
chsrc_ensure_program ("gem");
|
||||
|
||||
chsrc_set_measure_upstream ("https://rubygems.org/gems/nokogiri-1.15.0-java.gem");
|
||||
|
||||
chsrc_yield_source_and_confirm (pl_ruby);
|
||||
|
||||
char *cmd = NULL;
|
||||
|
@ -89,9 +89,7 @@ os_ubuntu_setsrc (char *option)
|
||||
chsrc_ensure_root ();
|
||||
|
||||
// https://github.com/RubyMetric/chsrc/issues/121
|
||||
SpeedMeasureInfo_t *upsmi = &UpstreamProvider.smi;
|
||||
upsmi->skip = NotSkip;
|
||||
upsmi->url = "http://archive.ubuntu.com/ubuntu/dists/noble/Contents-amd64.gz";
|
||||
chsrc_set_measure_upstream ("http://archive.ubuntu.com/ubuntu/dists/noble/Contents-amd64.gz");
|
||||
|
||||
if (chsrc_check_file (OS_Ubuntu_SourceList_DEB822))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user