(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!
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.
(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.