1 |
I felt like I should actually make a useful contribution to balance |
2 |
the less useful commit-message discussion ;). Browsing through the |
3 |
open Portage bugs, #175612 looked interesting. After I looked at |
4 |
pym/portage/package/ebuild/fetch.py, I decided to take a step back and |
5 |
just try and refactor fetch(), which was pushing 1k lines. Here are |
6 |
three paches pulling fairly self-contained blocks out of fetch(). I |
7 |
thought I'd float them to the list to see if this was a productive |
8 |
avenue, or if this is going to be too much work to review. I tried to |
9 |
avoid making too many changes other than the function-extraction, but |
10 |
in some places I couldn't help myself ;). |
11 |
|
12 |
The patches aren't particularly well tested yet. I ran the test suite |
13 |
and got some errors, but they seemed to be related to my non-root |
14 |
invocation, and not due to these changes themselves. I thought I'd |
15 |
post my work so far, before digging deeper into the test suite. |
16 |
|
17 |
Cheers, |
18 |
Trevor |
19 |
|
20 |
[1]: https://bugs.gentoo.org/show_bug.cgi?id=175612 |
21 |
|
22 |
W. Trevor King (3): |
23 |
pym/portage/package/ebuild/fetch.py: Factor out |
24 |
_get_checksum_failure_max_tries |
25 |
pym/portage/package/ebuild/fetch.py: Factor out _get_fetch_resume_size |
26 |
pym/portage/package/ebuild/fetch.py: Factor out _get_uris |
27 |
|
28 |
pym/portage/package/ebuild/fetch.py | 305 +++++++++++++++++++++--------------- |
29 |
1 file changed, 177 insertions(+), 128 deletions(-) |
30 |
|
31 |
-- |
32 |
1.8.5.2.8.g0f6c0d1 |