Including the link_extra files in blake3sums
Dependencies
- [2]
LIUJQXB7Allow merging two packages based on regular expressions of their name - [3]
BDEVQIAUHandle cyclic Ubuntu dependencies - [4]
ODUDDQRYAdding the OCaml interface - [5]
UWQB743KFirst working shell (with ocaml code)
Change contents
- edit in src/extract.rs at line 401
context_hasher.update(b"\0"); - edit in src/extract.rs at line 403
context_hasher.update(b"\0"); - replacement in src/extract.rs at line 406
vertices[v].context_path = Some(Arc::new(store_path.join(data_encoding::HEXLOWER.encode(context_hasher.finalize().as_bytes())),));let s = data_encoding::HEXLOWER.encode(context_hasher.finalize().as_bytes());vertices[v].context_path = Some(Arc::new(store_path.join(s))); - replacement in src/extract.rs at line 871
async fn copy(from: &Path, to: &Path) -> Result<(), std::io::Error> {async fn copy(hashing: &mut Vec<tokio::task::JoinHandle<Result<Option<(PathBuf, String)>, Error>>>,from: &Path,to: &Path,) -> Result<(), std::io::Error> { - edit in src/extract.rs at line 886
if p == Path::new("blake3sums") {continue;} - replacement in src/extract.rs at line 890
tokio::fs::hard_link(&elt, &to.join(&p)).await.unwrap_or(());let to_p = to.join(&p);tokio::fs::hard_link(&elt, &to_p).await.unwrap_or(());let p = p.to_path_buf();hashing.push(tokio::spawn(async move {// hash + writeinfo!("hashing {:?}", to_p);if let Ok(file) = tokio::fs::File::open(&to_p).await {let mut hasher = blake3::Hasher::new();hash_reader(file, &mut hasher).await.unwrap();let hex = data_encoding::HEXLOWER.encode(hasher.finalize().as_bytes());Ok::<_, Error>(Some((p, hex)))} else {Ok(None)}})); - edit in src/extract.rs at line 926
let mut hashing = Vec::new(); - replacement in src/extract.rs at line 935
copy(&vertices[d].context_path.clone().unwrap(), &tmp.dir_path()).await?copy(&mut hashing,&vertices[d].context_path.clone().unwrap(),&tmp.dir_path(),).await?; - edit in src/extract.rs at line 947
let mut hashing = Vec::new(); - edit in src/extract.rs at line 995
let f = rel.to_path_buf(); - replacement in src/extract.rs at line 1024
let path = path.strip_prefix(&vertices[v].downloaded.path).unwrap().to_str().unwrap();let path = path.to_str().unwrap();