fix pkg disable ignoring mount overlay flag

This commit is contained in:
2026-09-10 23:42:44 +03:00
parent 585b003a0b
commit 689526fb92
2 changed files with 6 additions and 5 deletions

View File

@ -1,6 +1,7 @@
use std::fs;
use crate::utils::fs::removelink::removelink;
use crate::utils::shell::*;
use crate::utils::parser::env::get_install_env;
pub fn disable(repo: &String, pkgname: &String) {
let source = &crate::commands::get_aeropkg_base().join(repo).join(pkgname);
@ -23,7 +24,10 @@ pub fn disable(repo: &String, pkgname: &String) {
if src.exists() { removelink(src, dest).map_err(|e| format!("Failed to remove link {} to {}: {}", src.display(), dest.display(), e)).unwrap() }
}
mount_overlay();
let builded_pkg_md_path = &crate::commands::get_aeropkg_base().join(repo).join(pkgname).join("build-script.md");
let full_env = get_install_env(repo, pkgname, builded_pkg_md_path, "link");
let mount_usr_dir_flag = full_env.get("mount_usr_dir").is_some();
if mount_usr_dir_flag { mount_overlay() }
shell_update();
fs::File::create(source.join("disabled")).ok();

View File

@ -29,10 +29,7 @@ pub fn link(repo: &String, pkgname: &String) {
let builded_pkg_md_path = &crate::commands::get_aeropkg_base().join(repo).join(pkgname).join("build-script.md");
let full_env = get_install_env(repo, pkgname, builded_pkg_md_path, "link");
let mount_usr_dir_flag = full_env.get("mount_usr_dir").is_some();
if mount_usr_dir_flag {
mount_overlay();
}
if mount_usr_dir_flag { mount_overlay() }
shell_update()
}