pijul nest
guest [sign in]

Including the link_extra files in blake3sums

pmeunier
Jul 2, 2025, 9:22 PM
KBT6MOT56XEHTPHXRQZH5SCQ7A4A6L4Q2WXAINADIA3BHWGGKROAC

Dependencies

  • [2] LIUJQXB7 Allow merging two packages based on regular expressions of their name
  • [3] BDEVQIAU Handle cyclic Ubuntu dependencies
  • [4] ODUDDQRY Adding the OCaml interface
  • [5] UWQB743K First working shell (with ocaml code)

Change contents

  • edit in src/extract.rs at line 401
    [2.2468]
    [2.2468]
    context_hasher.update(b"\0");
  • edit in src/extract.rs at line 403
    [2.2525]
    [2.2525]
    context_hasher.update(b"\0");
  • replacement in src/extract.rs at line 406
    [2.2588][2.2588:2737]()
    vertices[v].context_path = Some(Arc::new(
    store_path.join(data_encoding::HEXLOWER.encode(context_hasher.finalize().as_bytes())),
    ));
    [2.2588]
    [2.2737]
    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
    [3.30700][2.10516:10586]()
    async fn copy(from: &Path, to: &Path) -> Result<(), std::io::Error> {
    [3.30700]
    [2.10586]
    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
    [2.11033]
    [2.11033]
    if p == Path::new("blake3sums") {
    continue;
    }
  • replacement in src/extract.rs at line 890
    [2.11092][2.11092:11166]()
    tokio::fs::hard_link(&elt, &to.join(&p)).await.unwrap_or(());
    [2.11092]
    [2.11166]
    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 + write
    info!("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
    [2.11688]
    [2.11688]
    let mut hashing = Vec::new();
  • replacement in src/extract.rs at line 935
    [2.12050][2.12050:12143]()
    copy(&vertices[d].context_path.clone().unwrap(), &tmp.dir_path()).await?
    [2.12050]
    [3.32085]
    copy(
    &mut hashing,
    &vertices[d].context_path.clone().unwrap(),
    &tmp.dir_path(),
    )
    .await?;
  • edit in src/extract.rs at line 947
    [2.12215][2.12215:12249]()
    let mut hashing = Vec::new();
  • edit in src/extract.rs at line 995
    [3.34180]
    [2.14159]
    let f = rel.to_path_buf();
  • replacement in src/extract.rs at line 1024
    [2.15101][2.15101:15268]()
    let path = path
    .strip_prefix(&vertices[v].downloaded.path)
    .unwrap()
    .to_str()
    .unwrap();
    [2.15101]
    [2.15268]
    let path = path.to_str().unwrap();