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

Re: Malformed Release File



tag 138654 - patch
thanks

On Sat, Mar 16, 2002 at 02:21:55PM -0500, Adam Di Carlo wrote:
> "Chris Tillman" <tillman@voicetrak.com> writes:
> > So in this case, it really was a server problem. Is there some way we 
> > could check specifically for dns name resolution and ping-ability and 
> > return that as an error instead of Malformed Release file?
> It's possible -- but isn't this a debootstrap issue?  Shouldn't it be
> filed as a wishlist on that?

The bug's 138654 and is Cc'ed. The patch isn't suitable, it's a horrific
layering violation to try passing information from pkgdetails.c straight
back to boot-floppies. I'm not really convinced using random lines of
text from wget is particularly sensible either.

In any event, I think you'd be better off handling this within
boot-floppies. The simplest thing to do would be to attempt to download

	<mirror>/dists/<distro>/Release

and check something actually got downloaded. Doing it in boot-floppies
allows you to do more sensible error handling (like backtracking to the
mirror prompt if the error was `host not found', or to the distro name
if it was just file not found, or similar). As soon as you have the mirror
URL, it should be safe to try downloading:

	<mirror>/dists/stable/Release
	<mirror>/dists/testing/Release
	<mirror>/dists/unstable/Release

If none of those succeed, you don't have a valid mirror, or your network setup
is broken. If some fail, but others work, you've got a partial mirror
(by someone using Joey's scripts...).

Cheers,
aj

-- 
Anthony Towns <aj@humbug.org.au> <http://azure.humbug.org.au/~aj/>
I don't speak for anyone save myself. GPG signed mail preferred.

  ``Debian: giving you the power to shoot yourself in each 
       toe individually.'' -- with kudos to Greg Lehey



Reply to: