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

Bug#523986: marked as done (apt: Confusing "malformed Release file" error for nonexistent repository components)



Your message dated Fri, 14 Aug 2015 17:19:40 +0200
with message-id <20150814171534.GA7203@debian.org>
and subject line Re: Bug#523986: apt: Confusing "malformed Release file" error for nonexistent repository components
has caused the Debian Bug report #523986,
regarding apt: Confusing "malformed Release file" error for nonexistent repository components
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
523986: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=523986
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: apt
Severity: normal
Version: 0.7.20.2
Tags: patch

If you have an invalid component name in your sources.list file, e.g. the 
"mainy" in:

deb http://http.us.debian.org/debian/ sid mainy

and then you do an "apt-get update", you get this confusing error message:

W: Failed to fetch http://http.us.debian.org/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 (1) "Failed to fetch" and (2) the result of 
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).

I've looked at the code that generates this error, and it is clear from 
apt-pkg/algorithms.cc that "Failed to fetch" is printed for essentially 
any error in the "apt-get update" process.  This seems simply wrong; the 
best fix for this issue is probably to change the way the error string is 
generated to move the "Failed to fetch" into the individual error messages 
related to fetching, and have some other initial error string for errors 
related to parsing or finding required components.


As a short-term fix, I think it would be desireable to change 
apt-pkg/acquire-item.cc to replace the error message

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

with

"Fetched successfully, but expected entry " + (*Target)->MetaKey + " not 
found in Meta-index (misspelled, or Release file malformed?)"

so that the complete error message reads 

"W: Failed to fetch http://http.us.debian.org/debian/dists/sid/Release
Fetched successfully, but expected entry mainy/binary-i386/Packages not found in Meta-index (misspelled, or Release file malformed?)"

which I think is at least more clear.  I've attached a patch to do this 
simple improvement (though I'd prefer it if the broader problem were fixed 
instead).

	-Tim Abbott
=== modified file 'apt-pkg/acquire-item.cc'
--- old/apt-pkg/acquire-item.cc	2008-10-29 17:58:48 +0000
+++ new/apt-pkg/acquire-item.cc	2009-04-14 05:47:41 +0000
@@ -1055,8 +1055,8 @@
          if (!Record)
          {
             Status = StatAuthError;
-            ErrorText = "Unable to find expected entry  "
-               + (*Target)->MetaKey + " in Meta-index file (malformed Release file?)";
+	    ErrorText = "Fetched successfully, but expected entry " 
+               + (*Target)->MetaKey + " not found in Meta-index (misspelled, or Release file malformed?)";
             return;
          }
          ExpectedIndexHash = Record->Hash;


--- End Message ---
--- Begin Message ---
Version: 0.8.11

On Tue, Apr 14, 2009 at 01:58:32AM -0400, Tim Abbott wrote:
> Package: apt
> Severity: normal
> Version: 0.7.20.2
> Tags: patch
> 
> If you have an invalid component name in your sources.list file, e.g. the 
> "mainy" in:
> 
> deb http://http.us.debian.org/debian/ sid mainy
> 
> and then you do an "apt-get update", you get this confusing error message:
> 
> W: Failed to fetch http://http.us.debian.org/debian/dists/sid/Release 
> Unable to find expected entry mainy/binary-i386/Packages in Meta-index 
> file (malformed Release file?)

We now display 
Unable to find expected entry '%s' in Release file (Wrong sources.list entry or malformed file)

which should be clear enough to any reasonable person.

-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.

Be friendly, do not top-post, and follow RFC 1855 "Netiquette".
    - If you don't I might ignore you.

--- End Message ---

Reply to: