[Yum] modified date of header.info

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Let me just ponder aloud.  I'm not suggesting anything really.  You
just inspired some thoughts.

On Wed, Feb 25, 2004 at 04:06:18PM -0600, David Farning wrote:
> One can (to some extent) determine how up to dated a server is by
> importing urllib2 and adding the following to the try block in
> selectOptimalMirror(mirrors) from the yummy code that was posted a few
> days ago.

I don't think this would be unreasonable, especially as an option.
You don't always trust your mirror, and you're less likely to trust
multiple mirrors (as you discuss below) but it might be sane to say:
use my local header.info if it's less than N seconds older than the
one on the server.  Hell, even setting N to zero would be handy.  This
would be best with things like "yum list" of course (and is to some
extent accomplished by -C).

However, I'm not sure this is worth the time and energy.  Perhaps seth
would accept a sane patch agains HEAD, but then again, maybe he
wouldn't.

> I notice the Last-Modified time for "mirror"/core/development/headers/
> header.info tended to cluster around three general points.
> 
> Wed, 25 Feb 2004 11:50:51 GMT
> Thu, 19 Feb 2004 11:44:44 GMT
> Tue, 24 Feb 2004 11:20:34 GMT

First, let me mention a related problem.  It's possible to access a
server when it's in the process of updating (whether that be with
yum-arch or rsync).  The real solution for that would be a lockfile in
the repo.  Unfortunately, it would need to be a fairly complex
lockfile system.  For example, it's not enough to touch a YUM.LOCK
file while yum-arch is running because you'd have to keep checking for
the file.  You could keep a "next-update" file that said "I probably
won't be changing anything until 4 am".  Even that's not perfect
because you never know how long a process will take, and you sometimes
need to rebuild a repo unexpectedly.

Anyway, more to your point: The only thing I can think of for the
out-of-sync mirror problem is to have yum-arch touch a "last-updated"
file.  Mirrors would simply copy this file.  Then, yum could make sure
that it only uses mirrors that have the same update time.  If a server
can't produce this file, then it's right out (assuming you have this
checking turned on).  I suppose you could allow some slop if you
wanted to live on the edge.

However, this may simply come down to "if you don't trust your
mirrors, then don't use them".  I think that would be reasonable, too.
So far, I think this problem is purely theoretical.

					-Michael
-- 
  Michael D. Stenner                            mstenner@xxxxxxxxxxxxxxx
  ECE Department, the University of Arizona                 520-626-1619
  1230 E. Speedway Blvd., Tucson, AZ 85721-0104                 ECE 524G

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux