Comment 9 for bug 487682

Revision history for this message
Matthew Paul Thomas (mpt) wrote :

I won't disagree with Michael that if what apt-get update receives is not a package list, it should be discarded rather than overwriting the known-good package list. However, that wouldn't solve the problem of trying to install packages, because whenever apt tried to download a package, it would still get a copy of the sign-on page instead of the package data.

The same problem will occur for when you connect to an open wi-fi network that requires sign-in or payment, and try installing software before going through the sign-in process. Feel free to copy the rest of this comment elsewhere if the bug is already reported.

Here's how I imagine this working:

1. apt (or Empathy, or Thunderbird...) retrieves something over the Internet that is very different from the kind of data it was expecting.

2. apt says to Network Manager (since it's running), "Hey, I think we might not have a proper Internet connection here. Can you deal with it? I'll wait."

3. Network Manager sends off a request for a very simple ubuntu.com Web page of known contents, but receives something very different. "Yep, we're in sign-on land all right."

4. Since a GUI is running, and a sign-on window isn't open already, Network Manager opens one to display the response it received. It's a minimal browser-like window, with the title something like "Connect to {wi-fi network name}" if it's a wi-fi network, or "Connect to the Internet" otherwise.

5. You click "Register as a new user" in the Web page. Network Manager detects that you've gone from one page to another in the sign-on window, so for all it knows, you might be finished. Just in case you are, it tries retrieving that tiny test Web page again. Again the response is wrong, so NM knows you aren't finished.

6. Finally you complete the sign-on process. Again Network Manager detects that you've gone from one page to another (or that you closed the sign-on window), so it tests again to see whether you have a Web connection. This time, success. Network Manager broadcasts a D-Bus message, "okay, we're online now".

7. apt hears the message, and tries the original request again. This time, it works.