updated gnu repo

This commit is contained in:
pivodevat
2025-08-26 04:41:14 +03:00
parent 12583471f1
commit 7942284237
89 changed files with 995 additions and 202 deletions

View File

@ -97,10 +97,7 @@ fn upload_from_repo(repo: &String, pkgname: &String, pkg_md_path: &Path) -> Resu
fn check_build_dependency(repo: &String, pkg_md_path: &Path) -> Result<(), bool> {
let deps = match parser::get_build_deps(&pkg_md_path) {
Ok(deps) => deps,
Err(e) => {
eprintln!("Failed to parse dependencies {}: {}", &pkg_md_path.to_str().unwrap(), e);
return Err(false);
}
Err(_) => { return Ok(()) }
};
for dependency in deps.lines() {
@ -120,10 +117,7 @@ fn check_build_dependency(repo: &String, pkg_md_path: &Path) -> Result<(), bool>
fn check_run_dependency(pkg_md_path: &Path) -> Result<(), bool> {
let deps = match parser::get_run_deps(pkg_md_path) {
Ok(deps) => deps,
Err(e) => {
eprintln!("Failed to parse dependencies {}: {}", pkg_md_path.display(), e);
return Err(false);
}
Err(_) => { return Ok(()) }
};
let repo_list = match parser::get_repo_list() {

View File

@ -8,11 +8,5 @@ use std::path::PathBuf;
pub fn get_var_path() -> PathBuf {
let exe_path = std::env::current_exe().expect("Failed to get executable path");
exe_path
.parent()
.unwrap()
.join("../var")
.canonicalize()
.expect("Failed to canonicalize var path")
PathBuf::from(env!("SEXPKG_HOME")).join("var")
}

View File

@ -57,8 +57,7 @@ pub fn get_config_script<P: AsRef<Path>>(file_path: P) -> io::Result<String> {
pub fn get_repo_list() -> io::Result<Vec<String>> {
let base_path = env!("SEXPKG_HOME");
let file_path = PathBuf::from(base_path).join("var").join("sexpkg.md");
let file_path = crate::commands::get_var_path().join("sexpkg.md");
let block = extract_block(file_path, "``` cfg *** Repository list and priority ***", "```")?;