--7CZp05NP8/gJM8Cl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 20, 2003 at 04:57:40PM -0400, seth vidal wrote: > In answer to the rsync problem - Axel is right - there is another way to > fix it. I'll look back through that thread and maybe pull in the > timestamp nulling gzip patch that michael wrote. I browsed a bit through python docs. Well, I am not yet that solid in python, but here is an outline, of what could be done: a) Override GzipFile._write_gzip_header like Michael's gzip_notimestamp.py does (see his mail on the 20030429), but don't use write32u(self.fileobj, long(0)), instead introduce a static variable defaulting to zero. b) Introduce a new interface for setting this variable from outside GzipFile, e.g. Gzipfile.timestamp. c) Use stat on the rpm to extract its time stamp, and place that timestamp in the new variable before issuing GzipFile.open. Use utime to set the timestamp of the hdr file to that same timestamp. The result are *.hdr file containing the original rpm timestamp both inside the gzip header as well as in the inode's mtime. This will make reproducable yum headers. > I can see how that would help people, esp w/rsync. And also caching *.hdr files resulting to even faster yum operations. ;) And to get right to the next problem: If a file has a too long cache expiration time, you may get an unconsistend view of the repository. This is not a problem for the hdr files, as these should change their name, when the rpm is upgraded, but the header.info file might be updated, and should therefore never be cached. That can be fixed from the webserver's configuration, if the hdr files get a MIME extension. so here is a request for a MIME definition for hdrs! ;) How about application/x-rpmhdr or application/x-yumhdr or simply application/x-hdr? Then a servers Expire configuration (original stolen from Matthias) would look like: AddType application/x-rpm .rpm AddType application/x-yumhdr .hdr ExpiresActive on ExpiresDefault "now" ExpiresByType application/x-rpm "access plus 30 days" ExpiresByType application/x-yumhdr "access plus 30 days" --=20 Axel.Thimm@xxxxxxxxxxxxxxxxxxx --7CZp05NP8/gJM8Cl Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQE+9CXxQBVS1GOamfERAnjjAJ4vaDZEZ0qpt7eZWjJYVi4NhFm1kACcDPkK ndELxgyMSAHOQ29f2kyvPtc= =c2V4 -----END PGP SIGNATURE----- --7CZp05NP8/gJM8Cl--