apt becomes wedged, requiring shell script intervention, after using free cafe wifi connection

Bug #476135 reported by Nathaniel Smith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
One Hundred Papercuts
New
Undecided
Unassigned
apt (Ubuntu)
Opinion
Wishlist
Unassigned

Bug Description

Binary package hint: apt

As you know, many "hot spot" providers -- in this case a tea shop with free wifi -- have an obnoxious practice where when you first connect, all http requests are redirected to some pointless "click this button to connect to the internet!" page.

Apparently, update-manager or something decided to run an apt-get update while my wife's computer was connected to such a wifi network.

Now, there is an error pop up in her status bar saying:

E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_jaunty_restricted_binary-amd64_Packages
E: The package lists or status file could not be parsed or opened.
E: _cache->open() failed, please report.

and most apt-get/apt-cache commands error out as well. Examination of the above file in /var/lib/apt/lists/... reveals that instead of a Packages file, it contains the HTML text of one of the relevant "click this button to connect to the internet!" page.

That in itself is sort of fine... or at least there's nothing to be done, except beat up whoever designed these stupid routers. My objection is to the following:

njs@temeraire:~$ sudo apt-get update
[...]
Hit http://us.archive.ubuntu.com jaunty/restricted Packages
[...]
Reading package lists... Error!
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_jaunty_restricted_binary-amd64_Packages
E: The package lists or status file could not be parsed or opened.

Expected result: running 'apt-get update' should re-download the offending file, allowing the system to heal by itself.

Actual result: 'apt-get update' has no effect; unwedging the system requires deleting the offending file by hand, and then running 'apt-get update' again.

This is on jaunty, with apt version 0.7.20.2ubuntu6

Revision history for this message
Torsten Spindler (tspindler) wrote :

Have you tried running 'apt-get clean' to fix the situation?

Changed in apt (Ubuntu):
status: New → Incomplete
Revision history for this message
Nathaniel Smith (njs) wrote :

No, I forgot about that option at the time, but it would probably work.

I still claim that 'apt-get update' should suffice, though.

Changed in apt (Ubuntu):
status: Incomplete → New
Changed in apt (Ubuntu):
status: New → Opinion
importance: Undecided → Wishlist
Revision history for this message
AJenbo (ajenbo) wrote :

This bafels most users and is of no fault of there own, indeed they don't have to do any thing for it to happen, giving them errors that they don't under stand and would be unsure how to solve. It seams as something that should be simple for the system to solve by it self.

Revision history for this message
AJenbo (ajenbo) wrote :

Actually i think opinion+wishlist might be the wrong status for the bug, because why is apt downloading something with a HTML mime type, shoudn't it be expecting a text file?

Revision history for this message
Flemming Christensen (laoshi) wrote :

As we found out during a session on the Danish forum, the following command resolves the problem for users who encounter it:

sudo rm /var/lib/apt/lists/* && sudo apt-get update && sudo dpkg --configure -a && sudo apt-get autoremove && sudo apt-get update && sudo apt-get upgrade

you get a notice that ''/var/lib/apt/lists/partial' cannot be deleted which can be safely ignored.

Revision history for this message
AJenbo (ajenbo) wrote :

Actually apt-get clean is the *clean* way to solve it, but it is getting ridicules we has 3 people ask for help with this with in 10 hours, and we never seen it before, did some thing change in 11.04 that makes people more susceptible to attract this issue?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.