This is about 95% there, There are a few configurations that I haven't tested for almost everything here works. Classes depgraph and graph_display are now in depgraph.py in ../pym. I also took out most of the other functions from emerge and put them in emerge.py in ../pym. This is because both depgraph/graph_display and emerge use the auxillary functions, so I pulled them out to make them easier to include. Emerge itself still has a few functions that require globals that are also still present in the script. depgraph now gets passed myopts and myparams to make up for those globals. Depgraph also has another member called favorites, which is set in Emerge via helper function. Graph_Display now has myopts and Verbosity as __init__ parameters and as members. There are a few hacks still present ( syslist, olddbapi? ) that I haven't quite worked out yet and it sure it still a big mess.
Created attachment 56229 [details, diff] emerge with way less crap in it.
Created attachment 56230 [details] The depgraph and graph_display classes + imports this goes in /usr/lib/portage/pym
Created attachment 56231 [details] Anyone else I could take out of emerge without breaking it :) also goes in /usr/lib/portage/pym
Erm, it ate my filenames, damn bugzilla. The file containing depgraph and graph_display is depgraph.py The file with all the other crap that used to be in emerge ( the without breaking it one ) is emerge.py And I meant anything, not Anyone ;P
Created attachment 56233 [details, diff] The 3 combined per jstubbs I hope I did that right ;)
Created attachment 56238 [details, diff] I renamed emerge.py to emergelib.py and forgot to change the import lines ;) Also might want to just say screw it to the depgraph.py since it's basically a part of emergelib, it needs almost everything in emergelib and it has many of the same imports. Might consider it in the future.
Created attachment 56554 [details, diff] Minor fixed and hopefully correct diff flags The last patch broke emerge info, I mispelled a few things, etc. All should work now. Note that the spinner is hardcoded in many places. edebug also still broken, sigh.
screw it, closing because emerge sucks and needs to be rewritten :)