1 |
On 08/01/2012 06:02 PM, Zac Medico wrote: |
2 |
> On 08/01/2012 04:32 PM, Mark Kubacki wrote: |
3 |
>> Hi Portage devs, |
4 |
>> |
5 |
>> The attached patches fix some issues I've noticed as maintainer and |
6 |
>> user of Gentoo binhost(s). They're made against master/HEAD and can |
7 |
>> easily be backported to 2.1*. |
8 |
>> |
9 |
>> The first patch enables Portage to skip downloading a remote index if |
10 |
>> the local copy is recent enough. E.g., the remote index didn't change |
11 |
>> between to "emerge"-runs. This is done by setting "If-Modified-Since" |
12 |
>> request-header. The server responds with HTTP code 304 and Portage |
13 |
>> doesn't even load a single byte of the (large) index file. |
14 |
>> |
15 |
>> By the second patch Portage will download remote indices—which are |
16 |
>> text-files after all—compressed, if the remote server supports that. |
17 |
>> Although de-compression introduces a small latency, this will save |
18 |
>> bandwidth and transmission time. If the index needs to be fetched at |
19 |
>> all, that is (see the patch above). |
20 |
>> |
21 |
>> An index' TIMESTAMP entry is set before the corresponding file gets |
22 |
>> written. If the difference between TIMESTAMP and modification time |
23 |
>> ("mtime") is greater than or the times span one second, remote index |
24 |
>> files will be loaded despite the "If-Modified-Since" header. This is |
25 |
>> because TIMESTAMP of the local copy is compared with the remote index' |
26 |
>> "mtime". The third patch fixes that by setting "mtime" = TIMESTAMP. |
27 |
>> |
28 |
> |
29 |
> Thanks, I've applied your patches: |
30 |
> |
31 |
> http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=e06cb6d66db37ac7ab77acf65038b1f770c13c96 |
32 |
> http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=cbebf76d8e5666aad4984f87c2be83d474fe5a7e |
33 |
> http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=13abe0398fbe724218c8c9ac2597ebe15d7db7e1 |
34 |
> |
35 |
> I made a few trivial change in order to make them compatible with |
36 |
> python3. Also, I made it use the old behavior for protocols other than |
37 |
> http and https, in order to avoid issues with ftp like this one: |
38 |
> |
39 |
> https://bugs.gentoo.org/show_bug.cgi?id=415579 |
40 |
> |
41 |
|
42 |
Fix python2 http password breakage: |
43 |
|
44 |
http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=fbeb8101b20e232b2e8c55c9554b5fc9c5c72089 |
45 |
|
46 |
BUG: The if_modified_since parameter appears to be ignored when using |
47 |
http password authentication. |
48 |
-- |
49 |
Thanks, |
50 |
Zac |