summaryrefslogtreecommitdiff
path: root/src/info.rs
diff options
context:
space:
mode:
authorqvkap <qvkapp@gmail.com>2026-09-23 22:25:25 +0300
committerqvkap <qvkapp@gmail.com>2026-09-23 22:25:25 +0300
commitf890ebb3c4c8803e3dd4abba66e70657397f8122 (patch)
treef241c2463932e211bcd7b1f0492a7eec1e721fbf /src/info.rs
parent9f8906467a6c343a1a5d4a5afefc061ceba8e43d (diff)
downloadror-f890ebb3c4c8803e3dd4abba66e70657397f8122.tar.gz
ror-f890ebb3c4c8803e3dd4abba66e70657397f8122.zip
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.
Diffstat (limited to 'src/info.rs')
-rw-r--r--[-rwxr-xr-x]src/info.rs37
1 files changed, 1 insertions, 36 deletions
diff --git a/src/info.rs b/src/info.rs
index d827a53..eb258bb 100755..100644
--- 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<PathBuf> {
- 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<PathBuf> {
- 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 {