before index-conflict changes

This commit is contained in:
pivodevat
2025-11-18 19:46:36 +03:00
parent 28ba2135ec
commit 30540602bd
66 changed files with 1403 additions and 879 deletions

View File

@ -1,11 +1,12 @@
use std::path::PathBuf;
use std::fs;
use crate::utils::deletecopy::deletecopy;
use crate::utils::fs::deletecopy::deletecopy;
use crate::utils::shell::*;
pub fn disable(repo: &String, pkgname: &String) -> Result<(), String> {
let source = PathBuf::from("/pkg").join(repo).join(pkgname);
let _ = fs::File::create(&source.join("disabled"));
let source = crate::commands::get_aeropkg_base().join(repo).join(pkgname);
if source.join("disabled").exists() { return Ok(()) };
let destination = source.parent()
.ok_or("Failed to get parent directory for path")?
.to_path_buf();
@ -31,5 +32,6 @@ pub fn disable(repo: &String, pkgname: &String) -> Result<(), String> {
mount_overlay(&destination)?;
shell_update()?;
fs::File::create(&source.join("disabled")).ok();
Ok(())
}