mirror of
https://github.com/RubyMetric/chsrc
synced 2026-03-04 04:30:28 +08:00
Adjust chsrc_conclude()
This commit is contained in:
@@ -36,7 +36,9 @@ os_almalinux_setsrc (char *option)
|
||||
|
||||
chsrc_run (cmd, RunOpt_Default);
|
||||
chsrc_run ("dnf makecache", RunOpt_No_Last_New_Line);
|
||||
chsrc_conclude (&source, SetsrcType_Auto);
|
||||
|
||||
ProgMode_ChgType = ChgType_Auto;
|
||||
chsrc_conclude (&source);
|
||||
}
|
||||
|
||||
def_target_s(os_almalinux);
|
||||
|
||||
@@ -36,7 +36,9 @@ os_anolis_setsrc (char *option)
|
||||
|
||||
chsrc_run ("dnf makecache", RunOpt_Default);
|
||||
chsrc_run ("dnf update", RunOpt_No_Last_New_Line);
|
||||
chsrc_conclude (&source, SetsrcType_Untested);
|
||||
|
||||
ProgMode_ChgType = ChgType_Untested;
|
||||
chsrc_conclude (&source);
|
||||
}
|
||||
|
||||
def_target_s(os_anolis);
|
||||
|
||||
@@ -37,8 +37,6 @@ def_sources_n(os_fedora);
|
||||
void
|
||||
os_fedora_setsrc (char *option)
|
||||
{
|
||||
char *setsrc_type = xy_streql (option, SetsrcType_Reset) ? SetsrcType_Reset : SetsrcType_Auto;
|
||||
|
||||
chsrc_ensure_root ();
|
||||
|
||||
chsrc_yield_source_and_confirm (os_fedora);
|
||||
@@ -74,14 +72,15 @@ os_fedora_setsrc (char *option)
|
||||
|
||||
chsrc_run ("dnf makecache", RunOpt_No_Last_New_Line);
|
||||
|
||||
chsrc_conclude (&source, setsrc_type);
|
||||
ProgMode_ChgType = ProgMode_CMD_Reset ? ChgType_Reset : ChgType_Auto;
|
||||
chsrc_conclude (&source);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
os_fedora_resetsrc (char *option)
|
||||
{
|
||||
os_fedora_setsrc (SetsrcType_Reset);
|
||||
os_fedora_setsrc (option);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -67,7 +67,9 @@ os_rockylinux_setsrc (char *option)
|
||||
|
||||
chsrc_run (cmd, RunOpt_Default);
|
||||
chsrc_run ("dnf makecache", RunOpt_No_Last_New_Line);
|
||||
chsrc_conclude (&source, SetsrcType_Auto);
|
||||
|
||||
ProgMode_ChgType = ChgType_Auto;
|
||||
chsrc_conclude (&source);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -44,7 +44,9 @@ os_openeuler_setsrc (char *option)
|
||||
chsrc_overwrite_file (towrite, OS_openEuler_SourceList);
|
||||
|
||||
chsrc_run ("dnf makecache", RunOpt_No_Last_New_Line);
|
||||
chsrc_conclude (&source, SetsrcType_Auto);
|
||||
|
||||
ProgMode_ChgType = ChgType_Auto;
|
||||
chsrc_conclude (&source);
|
||||
}
|
||||
|
||||
def_target_s(os_openeuler);
|
||||
|
||||
Reference in New Issue
Block a user