Re: [mirrorbrain] How to make Squid work with mirrorbrain

From: Per Jessen <per_at_computer.org>
Date: Wed, 06 Jun 2012 09:35:24 +0200
Peter Pöml wrote:

[snip]

>> http://download.opensuse.org/distribution.meta4
>> 
>> Found 35 mirrors: 0 in the same network prefix, 0 in the same
>> autonomous system, 1 handling this country, 22 in the same region, 2
>> elsewhere
> 
> http://download.opensuse.org/distribution/ is a wrong URL, that's not
> a file, but a directory. 

Hi Peter

It was just one of my attempts to get a file that I could use as a test
for getting the mirror list.  I was a little surprised to get any
response at all. 

> If MirrorBrain shows mirrors for that file, it could be for several
> reasons: there could be a file of that name found on mirrors (but
> although that occurs, it's unlikely the case 35 times). Anyway,
> MirrorBrain doesn't (intent to) store directories, only files, so I
> would assume it could as well be a bug in the mirror scanner that
> directory names end up in the database. I'm surprised that this is the
> case so often. (Should be quite harmless, though.) 

Yeah, I guess it's only me who had this silly idea :-)

> Bottom line: don't try to check for existence of directories. Only
> checking for some file is feasible.
> 
> That's by design, because directories could be incomplete, meaning
> that mirrors mirror only some files within a given directory. (In the
> openSUSE case, for instance only the CDs, not the DVDs.)

Okay, thanks for the explanation, that makes sense. 

>> I could no doubt write something to use the mirror-list from multiple
>> files to cobble up a complete list, but that's even worse than my
>> primitive parsing of the mirrorlists.py output.
> 
> I just thought about this again, and I think it would be reasonable to
> produce a specific list for your kind of request. Just as mirrors
> resp. their URLs can be published on a web page like openSUSE does,
> the list of potential mirrors could be made public just as well. But I
> tend to prefer a "safe" default that does publish this data only on
> the sysadmin's will, and not by default. There could be some cases
> where requesting the URLs of all mirrors could not be wanted, or what
> do you guys think?

It's fine to leave it up to the admin - he also has the option to
publish the mirrorlist or not, it's his choice too.

>> I would like to just add another output format to mirrorlists.py (in
>> the mirrorbrain package), unfortunately (for my own purposes) it
>> would take a while before it would make it to e.g. the opensuse
>> download site. Still, my script could test on the availability and
>> default to parsing the xhtml output. Hmm, that could work.
> 
> I see. Yes, that would be one possibility.

It wouldn't be much work, but any code I would write would need testing,
and I don't have a mirrorbrain test setup available.



-- 
Per Jessen, Zürich (15.4°C)


_______________________________________________
mirrorbrain mailing list
Archive: http://mirrorbrain.org/archive/mirrorbrain/

Note: To remove yourself from this mailing list, send a mail with the content
 	unsubscribe
to the address mirrorbrain-request_at_mirrorbrain.org
Received on Wed Jun 06 2012 - 07:35:42 GMT

This archive was generated by hypermail 2.3.0 : Thu Jun 14 2012 - 09:17:03 GMT