1 |
Upon further testing, I'm updating a line in the patch |
2 |
|
3 |
On 4/28/06, m h <sesquile@×××××.com> wrote: |
4 |
> Folks- |
5 |
> |
6 |
> I'm submitting a patch of a refactoring of the emerge code in |
7 |
> 2.1_pre9-r5. This patch adds no features per se. But I believe it |
8 |
> makes the code much more readable. This only addresses the |
9 |
> /usr/lib/portage/bin/emerge file. |
10 |
> |
11 |
> It does the following: |
12 |
> |
13 |
> * attempts to remove all global variables (with the exception of the |
14 |
> spinner animation) |
15 |
> * breaks up the heinous 900 lines of code at the bottom of the file into: |
16 |
> * a __main__ section that calls out to |
17 |
> * do_SOMETHING where something is (depclean, search, info, config, etc) |
18 |
> * removes any code that was dangling at the leftmost side of my editor |
19 |
> and puts it under the __main__ section |
20 |
> * removes an olddbapi variable that isn't used |
21 |
> |
22 |
> I've tested it with the sync, remove, search, update and it appears to |
23 |
> work. Any feedback is welcome. |
24 |
> |
25 |
> I hope that this gets in for a few reasons. I'm helping out with |
26 |
> doing some work on the PREFIX branch, having the code unstructured |
27 |
> makes it really hard to follow (hopefully it can get into trunk so I |
28 |
> don't need to patch prefix, everytime it's updated). One of my |
29 |
> coworkers just started adding some functionality to emerge (he'll send |
30 |
> his patches in soon), but this is really his first week using python, |
31 |
> and I don't want this to leave a bad taste in his mouth.... ;) |
32 |
> |
33 |
> -matt |
34 |
> |
35 |
> |
36 |
> |