[2237] in athena10
Re: [DRAFT] apt: Confusing "malformed Release file" error for
daemon@ATHENA.MIT.EDU (Greg Price)
Mon Apr 13 01:32:33 2009
Date: Mon, 13 Apr 2009 01:32:04 -0400
From: Greg Price <price@MIT.EDU>
To: Tim Abbott <tabbott@mit.edu>
Cc: debathena@mit.edu
Message-ID: <20090413053204.GB21912@vinegar-pot.mit.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <alpine.DEB.1.10.0904130103070.28961@vinegar-pot.mit.edu>
Yes, I think a good solution will probably have to involve changing
that architecture. When I've seen messages like that before the
recent discussion of them, I've always been puzzled why it wasn't able
to fetch the file; I think that's going to remain confusing so long as
it says something that isn't true.
Or we could set ErrorText to something like
"Fetched successfully, but entry $entry not found"
or
"Fetched successfully, but entry $entry not found (misspelled, or Release file malformed?)"
so that at least the false statement is immediately contradicted.
But even that is confusing.
The simplest fix may be to just make the first line more general:
e.g. "Failed to fetch or parse ..."
Greg
On Mon, Apr 13, 2009 at 01:18:50AM -0400, Tim Abbott wrote:
> 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
> >