Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 917260

Summary: sys-apps/portage-3.0.51: does dependency resolution timer include waiting for lockfile?
Product: Portage Development Reporter: lekto
Component: CoreAssignee: Portage team <dev-portage>
Status: CONFIRMED ---    
Severity: normal CC: jstein
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description lekto 2023-11-12 18:18:39 UTC
Hi, I was installing Gentoo on older laptop on thumbdrive with poor iops. I got this when bash-completion was installing in background (I was looking at use flags):
> livecd ~ # emerge -pev @world
> 
> These are the packages that would be merged, in order:
> 
> Calculating dependencies   * waiting for lock on /var/db/.pkg.portage_lockfile ...
>                    [ ok ]
> ... done!
> Dependency resolution took 348.50 s.

Nearly 6min on system with barely anything more than basic stage 3 is stupidly long. I run this again after bash-completion was already installed and got:
> livecd ~ # emerge -pev @world 
> 
> These are the packages that would be merged, in order:
> Calculating dependencies... done!
> Dependency resolution took 12.43 s.

Looks like dependency resolution includes waiting for lockfile, which isn't feel right.
Comment 1 Zac Medico gentoo-dev 2023-11-12 21:54:01 UTC
We can time this lock and subtract it out:

> lib/_emerge/FakeVartree.py:                self._real_vardb.lock()