pub fn disable_repo_section_in_repos_conf_if_enabled(
path: &Path,
section_name: &str,
) -> Result<bool, String>Expand description
What: Persist enabled = false for a [[repo]] row only while it is currently enabled.
Inputs:
path:repos.confpath.section_name: Pacman[repo]name (case-insensitive trim).
Output:
Ok(true)when the file was updated;Ok(false)when the row is already disabled or equivalent.
Details:
- Does not toggle back to enabled when the row is already
enabled = false(unliketoggle_repo_enabled_for_section_in_file). - Returns an error when no matching
[[repo]]exists or read/parse/write fails.
ยงErrors
- Same shape as
toggle_repo_enabled_for_section_in_filefor missing rows and I/O.