Error message

  • Deprecated function: Return type of DatabaseStatementBase::execute($args = [], $options = []) should either be compatible with PDOStatement::execute(?array $params = null): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in require_once() (line 2244 of /home/xenoveritas/xenoveritas.org/includes/database/database.inc).
  • Deprecated function: Return type of DatabaseStatementEmpty::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in require_once() (line 2346 of /home/xenoveritas/xenoveritas.org/includes/database/database.inc).
  • Deprecated function: Return type of DatabaseStatementEmpty::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in require_once() (line 2346 of /home/xenoveritas/xenoveritas.org/includes/database/database.inc).
  • Deprecated function: Return type of DatabaseStatementEmpty::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in require_once() (line 2346 of /home/xenoveritas/xenoveritas.org/includes/database/database.inc).
  • Deprecated function: Return type of DatabaseStatementEmpty::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in require_once() (line 2346 of /home/xenoveritas/xenoveritas.org/includes/database/database.inc).
  • Deprecated function: Return type of DatabaseStatementEmpty::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in require_once() (line 2346 of /home/xenoveritas/xenoveritas.org/includes/database/database.inc).

Upgrading to Ubuntu 10.04 Behind a Proxy

If you do a update-manager -d under Ubuntu 9.10 and happen to be behind a firewall, you might notice that it appears to freeze as soon as you click on the Upgrade button. This is caused by a known bug in Ubuntu where the start of the upgrade process doesn't take your proxy settings into account.

It's been fixed in 10.04, but that doesn't help you if you're using 9.10 or 9.04.

So how do you fix it?

Well, you're going to need to edit /usr/lib/python2.6/dist-packages/UpdateManager/Core/utils.py. You'll need to do that as root, so open a Terminal and "sudo nano /usr/lib/python2.6/dist-packages/UpdateManager/Core/utils.py."

Press Ctrl-W and then Ctrl-T and type in "104" to jump to the problem lines:

      c = httplib.HTTPConnection(netloc)
      c.request("HEAD", path)

Change those lines to read:

      c = httplib.HTTPConnection("your.proxy.host:80")
      c.request("HEAD", scheme + netloc + path)

Where your.proxy.host:80 is the proxy host name followed by its port number. Press Ctrl-O and then press Enter to save, then Ctrl-X to exit.

You should now be able to click Upgrade and everything should go smoothly.

If you want the actual patch used (in case you don't know your proxy settings, I guess), go to line 103 and insert the following before it:

    proxy = os.getenv("http_proxy")
    if (proxy):
      path = scheme + netloc + path
      netloc = proxy

The new version should read something like:

  if scheme == "http":
    import httplib
    proxy = os.getenv("http_proxy")
    if (proxy):
      path = scheme + netloc + path
      netloc = proxy
    try:
      c = httplib.HTTPConnection(netloc)
      c.request("HEAD", path)

Since this is Python, whitespace counts.

Topics: 

Comments

Hi!

Thanks, your post saved my day :)

Hey thank you very much!

You're a hero !