From: Zac Medico <zmedico@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Subject: Re: [gentoo-portage-dev] [PATCH] portage: HTTP if-modified-since and compression
Date: Wed, 01 Aug 2012 18:02:47 -0700 [thread overview]
Message-ID: <5019D1B7.5050807@gentoo.org> (raw)
In-Reply-To: <CAHw5cr+A9zSRizzC+tYVv+gyZcd6Mpp6-ioOC6_RWGK8=AS4xA@mail.gmail.com>
On 08/01/2012 04:32 PM, Mark Kubacki wrote:
> Hi Portage devs,
>
> The attached patches fix some issues I've noticed as maintainer and
> user of Gentoo binhost(s). They're made against master/HEAD and can
> easily be backported to 2.1*.
>
> The first patch enables Portage to skip downloading a remote index if
> the local copy is recent enough. E.g., the remote index didn't change
> between to "emerge"-runs. This is done by setting "If-Modified-Since"
> request-header. The server responds with HTTP code 304 and Portage
> doesn't even load a single byte of the (large) index file.
>
> By the second patch Portage will download remote indices—which are
> text-files after all—compressed, if the remote server supports that.
> Although de-compression introduces a small latency, this will save
> bandwidth and transmission time. If the index needs to be fetched at
> all, that is (see the patch above).
>
> An index' TIMESTAMP entry is set before the corresponding file gets
> written. If the difference between TIMESTAMP and modification time
> ("mtime") is greater than or the times span one second, remote index
> files will be loaded despite the "If-Modified-Since" header. This is
> because TIMESTAMP of the local copy is compared with the remote index'
> "mtime". The third patch fixes that by setting "mtime" = TIMESTAMP.
>
Thanks, I've applied your patches:
http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=e06cb6d66db37ac7ab77acf65038b1f770c13c96
http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=cbebf76d8e5666aad4984f87c2be83d474fe5a7e
http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=13abe0398fbe724218c8c9ac2597ebe15d7db7e1
I made a few trivial change in order to make them compatible with
python3. Also, I made it use the old behavior for protocols other than
http and https, in order to avoid issues with ftp like this one:
https://bugs.gentoo.org/show_bug.cgi?id=415579
--
Thanks,
Zac
next prev parent reply other threads:[~2012-08-02 3:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAHw5crK-ek0EZashNgskiDPMM_bDycEX==KUXPmjWaTNyaOqCw@mail.gmail.com>
2012-08-01 23:32 ` [gentoo-portage-dev] [PATCH] portage: HTTP if-modified-since and compression Mark Kubacki
2012-08-02 1:02 ` Zac Medico [this message]
2012-08-02 2:31 ` Zac Medico
2012-08-02 19:57 ` Mark Kubacki
2012-08-02 21:13 ` Zac Medico
2012-08-03 1:29 ` Brian Dolbec
2012-08-03 9:33 ` W-Mark Kubacki
2012-08-03 14:33 ` Brian Dolbec
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5019D1B7.5050807@gentoo.org \
--to=zmedico@gentoo.org \
--cc=gentoo-portage-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox