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

Bug 275047

Summary: [PATCH] Split pym/_emerge/__init__.py into several small files
Product: Portage Development Reporter: Sebastian Luther (few) <SebastianLuther>
Component: CoreAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 210077    
Attachments: Part 1 - the easy stuff
simple stuff, had to move the getloadavg function into a module
part 3 - easy stuff, some test are going to be broken
part 4 - had to move some functions into their own files. one more patch and all the classes are in their own file.
part 5 - depgraph + Scheduler, all classes are moved out now. Had to use lazy imports to circumvent the circular dependency between these two classes.
part 6 - move the action_* functions (and related) into actions.py
actions.py

Description Sebastian Luther (few) 2009-06-22 12:32:39 UTC
This is the quest for a easier to follow portage code.
Comment 1 Sebastian Luther (few) 2009-06-22 12:37:26 UTC
Created attachment 195438 [details, diff]
Part 1 - the easy stuff

This patch moves out all classes that need no modification (except imports) and do not create circular dependencies between the modules.
Comment 2 Zac Medico gentoo-dev 2009-06-22 16:45:47 UTC
(In reply to comment #1)
> Created an attachment (id=195438) [edit]
> Part 1 - the easy stuff

Thanks, this is in svn r13663.
Comment 3 Sebastian Luther (few) 2009-06-22 18:16:53 UTC
Created attachment 195483 [details, diff]
simple stuff, had to move the getloadavg function into a module
Comment 4 Zac Medico gentoo-dev 2009-06-22 18:22:45 UTC
(In reply to comment #3)
> Created an attachment (id=195483) [edit]
> simple stuff, had to move the getloadavg function into a module

Thanks, this is in svn r13667.
Comment 5 Sebastian Luther (few) 2009-06-22 18:41:35 UTC
Created attachment 195492 [details, diff]
part 3 - easy stuff, some test are going to be broken
Comment 6 Zac Medico gentoo-dev 2009-06-22 18:48:14 UTC
(In reply to comment #5)
> Created an attachment (id=195492) [edit]
> part 3 - easy stuff, some test are going to be broken

Thanks, this is in svn r13668.
Comment 7 Sebastian Luther (few) 2009-06-22 19:55:50 UTC
Created attachment 195498 [details, diff]
part 4 - had to move some functions into their own files. one more patch and all the classes are in their own file.
Comment 8 Zac Medico gentoo-dev 2009-06-22 20:05:35 UTC
(In reply to comment #7)
> Created an attachment (id=195498) [edit]
> part 4 - had to move some functions into their own files. one more patch and
> all the classes are in their own file.

Thanks, this is in svn r13669.
Comment 9 Sebastian Luther (few) 2009-06-23 07:01:02 UTC
Created attachment 195530 [details, diff]
part 5 - depgraph + Scheduler, all classes are moved out now. Had to use lazy imports to circumvent the circular dependency between these two classes.
Comment 10 Sebastian Luther (few) 2009-06-23 07:38:30 UTC
Created attachment 195537 [details, diff]
part 6 - move the action_* functions (and related) into actions.py
Comment 11 Sebastian Luther (few) 2009-06-23 07:38:51 UTC
Created attachment 195538 [details, diff]
actions.py
Comment 12 Sebastian Luther (few) 2009-06-23 07:39:49 UTC
If you agree, I'd say this is done.
Comment 13 Sebastian Luther (few) 2009-06-23 07:58:18 UTC
(In reply to comment #9)
> Created an attachment (id=195530) [edit]
> part 5 - depgraph + Scheduler, all classes are moved out now. Had to use lazy
> imports to circumvent the circular dependency between these two classes.
> 

There is only one reference to Scheduler in depgrapg:
self._opts_no_restart = Scheduler._opts_no_restart

I think it should get this info from somewhere else.
Comment 14 Zac Medico gentoo-dev 2009-06-23 18:55:34 UTC
(In reply to comment #9)
> Created an attachment (id=195530) [edit]
> part 5 - depgraph + Scheduler, all classes are moved out now. Had to use lazy
> imports to circumvent the circular dependency between these two classes.

Thanks, this is in svn r13672.

(In reply to comment #10)
> Created an attachment (id=195537) [edit]
> part 6 - move the action_* functions (and related) into actions.py

Thanks, this is in svn r13672.


(In reply to comment #13)
> There is only one reference to Scheduler in depgrapg:
> self._opts_no_restart = Scheduler._opts_no_restart
> 
> I think it should get this info from somewhere else.

Yeah, we can just hardcode it if it simplifies things.
Comment 15 Zac Medico gentoo-dev 2009-08-03 23:07:16 UTC
This is fixed in 2.2_rc34.