In cargo.eclass: cargo_src_unpack() { ... for archive in ${A}; do case "${archive}" in *.crate) ... cargo-snapshot*) ... *) unpack ${archive} ;; esac done ... } Sometime I want unpack those file manually to other directory. Reproducible: Always
This might be problematic given it's exported as a phase?
removing or modifying it will break a lot of things, so it'll remain default behavior. I suggest just removing auto-unpacked stuff and unpacking again with a custom path, using unpack() call. other solution I see is separating *.cargo unpacker as a standalone function(s), so people can do src_unpack() { unpack_crates # searches only for *.crate in ${A} unpack whatever anywhere cargo_gen_config } and cargo_src_unpack can call it.
My original issue is a tarball don't have a root directory, unpack it directly will put every file into ${WORKDIR}. But later I found that tarball, https://chromium.googlesource.com/chromium/src/third_party/zlib/+archive/e84c9a3fd75fdc39055b7ae27d6ec508e50bd39e.tar.gz don't have a stable checksum. It seems go-module.eclass have the same behavior, so just remain this behavior in cargo.eclass. I will use git submodule instead.