public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] pycargoebuild can now generate "crate tarballs"
Date: Wed, 29 Nov 2023 17:59:23 +0100	[thread overview]
Message-ID: <f347c25b226774394113d1c6a8e0ada7a289b3a3.camel@gentoo.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1193 bytes --]

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


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 512 bytes --]

                 reply	other threads:[~2023-11-29 16:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f347c25b226774394113d1c6a8e0ada7a289b3a3.camel@gentoo.org \
    --to=mgorny@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox