[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    [gentoo-dev] pycargoebuild can now generate "crate tarballs"
From:       Michał_Górny <mgorny () gentoo ! org>
Date:       2023-11-29 16:59:23
Message-ID: f347c25b226774394113d1c6a8e0ada7a289b3a3.camel () gentoo ! org
[Download RAW message or body]


Hi, everyone.

app-portage/pycargoebuild-0.12 brings a new useful feature: generating
"crate tarballs" that can be used to easily deliver all crates,
resulting in much smaller Manifest, ebuild and much faster fetch+unpack.
This is currently experimental, so I'd appreciate your testing
and feedback.

Long story short, run pycargoebuild with --crate-tarball, e.g.:

$ pycargoebuild --crate-tarball -i fractal-5.ebuild \
    /tmp/portage/net-im/fractal-5/work/fractal-5/
[...]
INFO     Crate tarball written to /tmp/dist/fractal-5.0.0-crates.tar.xz 


pycargoebuild will fetch all crates (as usual), repack them into a
single .tar.xz and put empty CRATES="\n" into the ebuild (some
whitespace is required to workaround cargo.eclass right now).  You may
want to rename the tarball (the default name is based off Cargo.toml
metadata), upload it somewhere and then add it to SRC_URI.

Note that GIT_CRATES aren't repacked.

Now some numbers, for fractal-5:

ebuild: 15 KiB → 4 KiB
Manifest: 180 KiB → 1.5 KiB
download time: 70 s → 2 s
distfile count: 597 → 4
distdir size: 76 MiB → 45 MiB
unpack time: 15 s → 6 s

-- 
Best regards,
Michał Górny


["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic