add .pkgdata; add non-download packages

This commit is contained in:
2026-09-12 04:17:58 +03:00
parent 1c3a598881
commit 513d336a07
22 changed files with 186 additions and 83 deletions

View File

@ -9,8 +9,6 @@ pub fn download(repo: &String, pkgname: &String) {
let pkg_md_path = &crate::commands::get_aeropkg_var().join(format!("{}/{}.md", repo, pkgname));
if !pkg_md_path.exists() { upload_from_repo(repo, pkgname, pkg_md_path) }
let full_env = get_install_env(repo, pkgname, pkg_md_path, "download");
let url = match parser::pkginfo::get_url(pkg_md_path) {
Ok(url) => url,
Err(e) => {
@ -29,6 +27,14 @@ pub fn download(repo: &String, pkgname: &String) {
fs::remove_dir_all(&src).unwrap()
}
}
let pkgdata = crate::commands::get_aeropkg_var().join(repo).join(pkgname).join(".pkgdata.patch");
if pkgdata.exists() {
let status = Command::new("cp").args(["-rPl", &format!("{}/.", pkgdata.to_string_lossy()), &src.to_string_lossy()]).status();
if let Err(e) = status { eprintln!("Warning: failed to copy .pkgdata for {}/{}: {}", repo, pkgname, e) }
}
let full_env = get_install_env(repo, pkgname, pkg_md_path, "download");
if url.ends_with(".git") || url.starts_with("git://") {
let git_status = Command::new("git")