Closed lima-limon-inc closed 1 month ago
Yes, the tool is written with the assumption that you're able to access the distfiles directory on a development system. Unless I'm missing something, otherwise you won't be able to do stuff like updating Manifests anyway (since the PM won't be able to fetch distfiles).
It could put files elsewhere but that would be quite inefficient. The main point is to preserve them so that the subsequent PM invocation could use them. If pycargoebuild put them in a temporary directory, you'd have to fetch them again a minute later — and on top of that, pycargoebuild does fetching much faster than Portage does.
So yes, my advice would be to add your user to portage
group, since otherwise you're going to have a hard time working on ebuilds anyway. If you really insist, you can give it another distfile directory but that definitely shouldn't be the default. Also, you may want to install net-misc/aria2
to fetch crates faster, given that crates.io
is horribly slow.
Yes, the tool is written with the assumption that you're able to access the distfiles directory on a development system. Unless I'm missing something, otherwise you won't be able to do stuff like updating Manifests anyway (since the PM won't be able to fetch distfiles).
It could put files elsewhere but that would be quite inefficient. The main point is to preserve them so that the subsequent PM invocation could use them. If pycargoebuild put them in a temporary directory, you'd have to fetch them again a minute later — and on top of that, pycargoebuild does fetching much faster than Portage does.
So yes, my advice would be to add your user to
portage
group, since otherwise you're going to have a hard time working on ebuilds anyway. If you really insist, you can give it another distfile directory but that definitely shouldn't be the default. Also, you may want to installnet-misc/aria2
to fetch crates faster, given thatcrates.io
is horribly slow.
Great to know, I'll add my user the portage group. Besides, I made a small clarification in the wiki page of cargo ebuild regading these permissions here.
Thank you very much mgorny!
Have a nice week :blush:
Thanks!
When using
pycargoebuild
with no arguments (as stated by the wiki) I get the following error:The error pops up regardless of how many times you run the command. AFAIK, it stems from the fact that my user only has read permissions for the
/var/cache/distfiles/
.Calling
pycargoebuild --help
I found out that I needed to specify a "Directory to store downloaded crates in".Now, either my user has to be in the portage group or I have to call this program as
sudo
. Is this understanding correct? Is that an intended feature?If that's the case, maybe a little rewrite could be done to the wiki page: https://wiki.gentoo.org/wiki/Writing_Rust_ebuilds#Making_a_versioned_ebuild
An, another question, why the need to store these files in the
distfiles
directory? Wouldn't it make sense to store them in a newly createdtmp/
directory by default? Or should those files be kept?Thanks in advance and thank you for all your work.