http_proxy='' breaks the update-notifier downloader

Bug #1065155 reported by moray33
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Python
Invalid
Undecided
Unassigned
update-notifier (Ubuntu)
New
Low
Unassigned

Bug Description

I installed Flash installing the restricted-extras, but every time that is a update avaliable and I upgrade the package using Muon, Flash doesn't work anymore. To fix it, I need to uninstall the package and install it using the terminal. And I know that this issue doesn't happen with other package managers.

I reported this as a Muon bug (https://bugs.kde.org/show_bug.cgi?id=308186) and they told me this:
<<Yes, it does fail within Muon, but the ultimate failure is an uncaught exception in the script the packaging runs to download the actual flash plugin. The difference would be that package managers like apt-get and Synaptic run dpkg in a terminal emulator, whereas package managers like Muon and PackageKit run dpkg in a pty. (A perfectly valid thing to do.) The script within the flashplugin-installer package erroneously assumes that the package is being installed in a virtual terminal emulator environment, which triggers the uncaught exception within the script.>>

So, I hope you can solve this.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: muon 1.3.1-0ubuntu2
ProcVersionSignature: Ubuntu 3.2.0-31.50-generic 3.2.28
Uname: Linux 3.2.0-31-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu13
Architecture: amd64
Date: Wed Oct 10 19:13:27 2012
InstallationMedia: Kubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20120319)
ProcEnviron:
 LANGUAGE=
 LANG=es_ES.UTF-8
 SHELL=/bin/bash
SourcePackage: muon
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
moray33 (moray33) wrote :
affects: muon (Ubuntu) → flashplugin-nonfree (Ubuntu)
Revision history for this message
Jonathan Thomas (echidnaman) wrote :

If the http_proxy environment variable is set but empty, python's urllib craps its pants and tries to concatenate a string with a NoneType object:

Traceback (most recent call last):
  File "/usr/lib/update-notifier/package-data-downloader", line 234, in process_download_requests
    dest_file = urllib.urlretrieve(files[i])[0]
  File "/usr/lib/python2.7/urllib.py", line 93, in urlretrieve
    return _urlopener.retrieve(url, filename, reporthook, data)
  File "/usr/lib/python2.7/urllib.py", line 243, in retrieve
    fp = self.open(url, data)
  File "/usr/lib/python2.7/urllib.py", line 201, in open
    name = 'open_' + urltype
TypeError: cannot concatenate 'str' and 'NoneType' objects

That's what is causing the bug.

affects: flashplugin-nonfree (Ubuntu) → python2.7 (Ubuntu)
affects: flash-install → python
Revision history for this message
Jonathan Thomas (echidnaman) wrote :

With some added debug statements to confirm...

flashplugin-installer: downloading http://archive.canonical.com/pool/partner/a/adobe-flas$
full url: http://archive.canonical.com/pool/partner/a/adobe-flashplugin/adobe-flashplugin$
url type: http
proxies:
[('http', '')]
Traceback (most recent call last):
  File "/usr/lib/update-notifier/package-data-downloader", line 234, in process_download_$
    dest_file = urllib.urlretrieve(files[i])[0]
  File "/usr/lib/python2.7/urllib.py", line 93, in urlretrieve
    return _urlopener.retrieve(url, filename, reporthook, data)
  File "/usr/lib/python2.7/urllib.py", line 243, in retrieve
    fp = self.open(url, data)
  File "/usr/lib/python2.7/urllib.py", line 201, in open
    name = 'open_' + urltype
TypeError: cannot concatenate 'str' and 'NoneType' object

Compared to when http_proxy is undefined:
flashplugin-installer: downloading http://archive.canonical.com/pool/partner/a/adobe-flas$
full url: http://archive.canonical.com/pool/partner/a/adobe-flashplugin/adobe-flashplugin$
url type: http
proxies:
[]

Matthias Klose (doko)
affects: python2.7 (Ubuntu) → update-notifier (Ubuntu)
Changed in python:
status: New → Invalid
Revision history for this message
Steve Langasek (vorlon) wrote :

> If the http_proxy environment variable is set but empty, python's urllib craps its pants and tries to concatenate a string with a NoneType object:

Right. So don't set it to the empty string, that makes no sense.

And this part from the original bug description is simply false:

> package managers like apt-get and Synaptic run dpkg in a terminal emulator,
> whereas package managers like Muon and PackageKit run dpkg in a pty.

A terminal emulator *is* a pty.

Changed in update-notifier (Ubuntu):
importance: Undecided → Low
summary: - Flash doesn't work after upgrading it with Muon
+ http_proxy='' breaks the update-notifier downloader
Steve Langasek (vorlon)
tags: added: bitesize
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.