[2236] in athena10

home help back first fref pref prev next nref lref last post

Re: [DRAFT] apt: Confusing "malformed Release file" error for

daemon@ATHENA.MIT.EDU (Tim Abbott)
Mon Apr 13 01:19:29 2009

Date: Mon, 13 Apr 2009 01:18:50 -0400 (EDT)
From: Tim Abbott <tabbott@MIT.EDU>
To: Greg Price <price@mit.edu>
cc: debathena@mit.edu
In-Reply-To: <20090413045737.GY21912@vinegar-pot.mit.edu>
Message-ID: <alpine.DEB.1.10.0904130103070.28961@vinegar-pot.mit.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

Looking at the code, it seems like it might be difficult to change:

apt-pkg/acquire-item.cc sets the error text string as:

ErrorText = "Unable to find expected entry  " + 
            (*Target)->MetaKey + 
            " in Meta-index file (malformed Release file?)";

And the relevant "Failed to fetch %s" is hardcoded in 
apt-pkg/algorithms.cc, where the %s is the path to the release file, and 
it's followed by essentially the ErrorText variable from above.  So the 
"Failed to fetch" part of the message appears to be printed for _any_ 
error related to downloading and parsing a sources.list entry during 
"apt-get update".

Still, we could do anything of the form:

"Failed to fetch http://debian.lcs.mit.edu/debian/dists/sid/Release
BLAH BLAH BLAH"

Or we could suggest that perhaps this architecture isn't a very good one.

	-Tim Abbott

On Mon, 13 Apr 2009, Greg Price wrote:

> The message is even more puzzling than that the parenthetical is
> wrong, no?  It says "Failed to fetch $URI" when in fact it had no
> trouble fetching $URI -- rather it failed to find the desired entry
> inside it.
> 
> A better message could be
> 
> W: Couldn't find mainy/binary-i386/Packages in http://debian.lcs.mit.edu/debian/dists/sid/Release
> 
> (or "No entry mainy/..." or "Index mainy/... not found in ..." or etc.)
> 
> If a two-line message is desired to reduce wrapping, it could be
> 
> W: Entry not found in http://debian.lcs.mit.edu/debian/dists/sid/Release
> Failed to find Packages file for mainy/binary-i386
> 
> Greg
> 
> 
> 
> On Sat, Apr 11, 2009 at 06:14:15PM -0400, Tim Abbott wrote:
> > Below is a draft bug report for the confusing malformed release file error 
> > bug.  Thoughts?  I've reproduced on sid.
> > 
> > I can attach a patch to the report, once we settle on wording.
> > 
> > 	-Tim Abbott
> > 
> > -------------
> > 
> > Package: apt
> > Severity: normal
> > Version: 0.7.20.2
> > 
> > If you have an invalid component name in your sources.list file, e.g.:
> > 
> > deb http://debian.lcs.mit.edu/debian/ sid mainy
> > 
> > and then you do an "apt-get update", you get this confusing error message:
> > 
> > W: Failed to fetch http://debian.lcs.mit.edu/debian/dists/sid/Release 
> > Unable to find expected entry mainy/binary-i386/Packages in Meta-index 
> > file (malformed Release file?)
> > 
> > Suggesting that the problem is a malformed Release file is very confusing 
> > here, given that the issue here is a problem with the local configuration, 
> > not the remote repository (and that a typo in sources.list is probably 
> > much more common than a malformed Release file).
> > 
> > Perhaps we should change "(malformed Release file?)" to "(likely caused by 
> > either configuring a nonexistent repository component or a malformed 
> > Release file)"
> > 
> > 	-Tim Abbott
> 

home help back first fref pref prev next nref lref last post