Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can ebuild commands be executed in parallel?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
fpemud
Guru
Guru


Joined: 15 Feb 2012
Posts: 354

PostPosted: Fri Apr 25, 2025 1:29 am    Post subject: Can ebuild commands be executed in parallel? Reply with quote

I am writing a script for batch modification of ebuild files and generation of new Manifest files.
I'd like to know whether executing many (hundreds of) ebuild commands in parallel would pose issues. I will do this job unattended & periodicly, robustness is important.

Specifically:
1. Does ebuild rely on shared resources that could lead to conflicts during parallel execution? (two packages may download same file to distfiles directory?)
2. Does ebuild command have enough locking mechanisms?
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3608

PostPosted: Fri Apr 25, 2025 10:23 am    Post subject: Reply with quote

You should be good unless you really let loose to the point of running out of resources. While not theoretically impossible, doing it with manifests would be quite an achievement.
There's nothing to lock unless you're actually merging those packages. Emerge resolves dependencies and tries to keep your system usable at all times, that's why it needs to calculate a plan first.
_________________
Make Computing Fun Again
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 55179
Location: 56N 3W

PostPosted: Fri Apr 25, 2025 11:19 am    Post subject: Reply with quote

fpemud,

Take care you don't waste resources building the same package multiple times.
That happens, when you parellel build packages with a common dependency.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 4045
Location: Rasi, Finland

PostPosted: Sat Apr 26, 2025 6:04 am    Post subject: Reply with quote

If you're only doing source fetching and manifest creation, then do the fetching in series and after that you can do the manifest refreshing in parallel.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
fpemud
Guru
Guru


Joined: 15 Feb 2012
Posts: 354

PostPosted: Sat Apr 26, 2025 1:17 pm    Post subject: Reply with quote

Thank you, guys!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum