From f890ebb3c4c8803e3dd4abba66e70657397f8122 Mon Sep 17 00:00:00 2001 From: qvkap Date: Wed, 23 Sep 2026 22:25:25 +0300 Subject: Bumped version to 1.0.3, fixing temporary file persistence via keep(), preventing UsrMerge circular symlink bugs, adding a host fallback for ldconfig, making virtual FS mount failures non-fatal during rootfs build, improving YAML error reporting, normalizing file permissions, and updating dependencies. --- src/info.rs | 37 +------------------------------------ 1 file changed, 1 insertion(+), 36 deletions(-) mode change 100755 => 100644 src/info.rs (limited to 'src/info.rs') diff --git a/src/info.rs b/src/info.rs old mode 100755 new mode 100644 index d827a53..eb258bb --- a/src/info.rs +++ b/src/info.rs @@ -1,43 +1,8 @@ use serde::{Deserialize, Serialize}; use std::fs; -use std::path::{Path, PathBuf}; use colored::Colorize; -const REPO_ROOT: &str = "/var/ror/packages"; - -fn find_case_insensitive_dir(parent: &Path, target: &str) -> Option { - let exact = parent.join(target); - if exact.exists() && exact.is_dir() { - return Some(exact); - } - let target_lower = target.to_lowercase(); - for entry in fs::read_dir(parent).ok()? { - let entry = entry.ok()?; - if entry.file_type().ok()?.is_dir() && entry.file_name().to_string_lossy().to_lowercase() == target_lower { - return Some(entry.path()); - } - } - None -} - -fn find_package_file(pkg_name: &str) -> Option { - let repo = Path::new(REPO_ROOT); - for entry in fs::read_dir(repo).ok()? { - let entry = entry.ok()?; - let cat_path = entry.path(); - if !cat_path.is_dir() { - continue; - } - if let Some(pkg_dir) = find_case_insensitive_dir(&cat_path, pkg_name) { - let dir_name = pkg_dir.file_name()?.to_string_lossy(); - let pkg_path = pkg_dir.join(format!("{}.yaml", dir_name)); - if pkg_path.exists() && pkg_path.is_file() { - return Some(pkg_path); - } - } - } - None -} +use crate::install::find_package_file; #[derive(Debug, Serialize, Deserialize)] struct Package { -- cgit v1.2.3