Comment 0 for bug 1009436

Revision history for this message
Adrianna PiƄska (confluence) wrote :

I previously reported this in #983559, but it seems that it is a completely unrelated issue.

1) Ubuntu 12.04 LTS
2) 0.119ubuntu8.4
3) I expected to be able to install packages which need to download external files (e.g. flashplugin-installer, ttf-mscorefonts-installer)
4) package-data-downloader is unable to download these files through my cntlm proxy

At university, I can only access the outside world through an NTLM proxy, so I direct everything through a cntlm proxy running locally on my machine. Everything used to work as expected, but since the change in Precise to the way that packages download external files, I am unable to install these packages unless I hack the package-data-downloader script to replace urllib with an external wget call (patch included).

This is definitely not an issue with finding the proxy settings when using sudo -- I have verified that the environment variables are found as expected. I have also reproduced this issue with a minimal python example which I have run as my normal user.

If I monitor the /tmp/ directory after issuing the command to install one of these packages, I can see that a temporary file is created and grows until it reaches the expected size of the file to be downloaded. However, the script does not detect that the file has finished downloading, and hangs forever, without giving any indication of an error, until it is terminated.

Since I am able to download these files without any difficulty using wget, I have patched my script to use wget instead of urllib. When I do this, everything works as expected. I therefore believe that there is a bug in urllib which is triggered by cntlm. I have looked for a known bug which could be responsible, but I haven't been able to find anything yet.

In the meantime, using wget instead of urllib fixes the problem. I don't know if this is considered a tidy solution, but it works.