Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 275047 - [PATCH] Split pym/_emerge/__init__.py into several small files
Summary: [PATCH] Split pym/_emerge/__init__.py into several small files
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 210077
  Show dependency tree
 
Reported: 2009-06-22 12:32 UTC by Sebastian Luther (few)
Modified: 2009-08-03 23:07 UTC (History)
0 users

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


Attachments
Part 1 - the easy stuff (portage-_emerge-split-__init.py.part1.patch,193.36 KB, patch)
2009-06-22 12:37 UTC, Sebastian Luther (few)
Details | Diff
simple stuff, had to move the getloadavg function into a module (part2.patch,21.96 KB, patch)
2009-06-22 18:16 UTC, Sebastian Luther (few)
Details | Diff
part 3 - easy stuff, some test are going to be broken (part3.patch,19.70 KB, patch)
2009-06-22 18:41 UTC, Sebastian Luther (few)
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. (part4.patch,132.21 KB, patch)
2009-06-22 19:55 UTC, Sebastian Luther (few)
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. (part5.patch,456.94 KB, patch)
2009-06-23 07:01 UTC, Sebastian Luther (few)
Details | Diff
part 6 - move the action_* functions (and related) into actions.py (part6.patch,89.96 KB, patch)
2009-06-23 07:38 UTC, Sebastian Luther (few)
Details | Diff
actions.py (actions.py,85.31 KB, patch)
2009-06-23 07:38 UTC, Sebastian Luther (few)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.