Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 156532 - cache 'emerge -p' results
Summary: cache 'emerge -p' results
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-28 11:44 UTC by jonathan e. Snow
Modified: 2006-11-28 20:23 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jonathan e. Snow 2006-11-28 11:44:00 UTC
(Copied from forum post)

Can't portage cache the results of 'emerge ... -p', so that 
 the dependencies don't have to be recalculated each time? 
 revdep-rebuild does this, and it's nice. Have to clear the cache 
 if the next emerge command has a different command line of course. 
 How about a command line option 'emerge --for_real' that means 
 whatever I just -p'ed, do that. The infrastructure for such a thing 
 must already exist, because there is 'emerge --resume' 
 
 Please? 
 
 Us with slow systems would appreciate it. I know about '-a'.


Thanks for all your great work!
Comment 1 Alec Warner (RETIRED) archtester gentoo-dev Security 2006-11-28 19:39:25 UTC
You can't cache -p results as there are far too many things that affect the depgraph (including what PORTDIR is used, USE flags, USE_EXPAND flags, overlays, etc...)  We would have to store all of that information and then check it every time you run a command to see if we should cache it or not.

I think your thought is that there should be some kind of emerge --depgraph option that just does some depgraph stuff and then serializes it into the mtimedb.  I'm not a fan of that :)

Also you would essentially get *that depgraph*, even if you changed USE flags or whatnot.  And if you did change use flags between generating the depgraph and using it; you may not get sane behavior as the depgraph doesn't represent your system properly.
Comment 2 Zac Medico gentoo-dev 2006-11-28 20:23:05 UTC
(In reply to comment #1)
> You can't cache -p results as there are far too many things that affect the
> depgraph (including what PORTDIR is used, USE flags, USE_EXPAND flags,
> overlays, etc...)  We would have to store all of that information and then
> check it every time you run a command to see if we should cache it or not.

Of course we _can_, but that doesn't mean it's a good idea.  Sure, the current --resume code does something that appears like that already.  However, it doesn't currently store all of the information and I don't think it would be a good idea anyway.  In fact, I think that the resume list that is currently stored should only really be used for things like resumption of `emerge -e world`.  In other cases, I feel that it would be most appropriate for --resume to recalculate the dependencies in order to ensure that the job being resumed makes sense within the currently context.

In short, --ask is the best option right now.  In the future, we should be able to optimize everything so that the dependency calculations take less time, but we're not there yet.