ttf-mscorefonts-installer installation popup and probable failure

Bug #979477 reported by Thomas Bushnell, BSG on 2012-04-12
72
This bug affects 15 people
Affects Status Importance Assigned to Milestone
update-notifier (Ubuntu)
High
Steve Langasek

Bug Description

Recently we see the following when ttf-mscorefonts-installer is installed, after accepting licensing terms, a popup appears with the following contents:

The following packages requested additional data downloads after package
 installation, but the data could not be downloaded or could not be
 processed.
 .
 .
   ttf-mscorefonts-installer
 .
 .
 The download will be attempted again later, or you can try the download
 again now. Running this command requires an active Internet connection.

It happens repeatedly if you do apt-get install --reinstall ttf-mscorefonts-installer.

Something is wrong in the move of the download from /usr/lib/msttcorefonts/update-ms-fonts to wherever it is supposed to live now.

Steve Langasek (vorlon) wrote :

Does /var/log/apt/term.log offer any more explanation for why the download has failed here? Is there an apt proxy setting on the affected systems pointed to a proxy that doesn't allow arbitrary file downloads? (Where previously msttcorefonts looked for an $http_proxy env variable, it now uses the apt proxy settings, bringing it in line with flashplugin-installer behavior.)

Previously, msttcorefonts also used a list of fallback download hosts; now it assumes that http://downloads.sourceforge.net/corefonts/ will always work, and that if not it's an issue that the user can/should fix up by hand. Is there a problem using this particular download URL, vs. one of the mirrors?

Changed in msttcorefonts (Ubuntu):
assignee: nobody → Steve Langasek (vorlon)
status: New → Incomplete
Steve Langasek (vorlon) wrote :

BTW, you should be able to reproduce this by running 'sudo /usr/lib/update-notifier/package-data-downloader' by hand; the output may be enlightening (or not).

There is an apt proxy, in fact. This is a regression; the old script before the change simply fetched the files directly.

We set the proxy with

Acquire::http::Proxy "http://internal-hostname:PORT/"

(where "internal-hostname" is a hostname, and "PORT" is a decimal for the correct port on which the proxy runs.

If I remove the proxy specification, it works fine.

I think this is a bad way to go; the Apt proxy specifies specifically where apt looks, and should not be specifying where downloads in general happen.

BTW, I should add for completeness that I can verify that removing the proxy setting allows the download to proceed without incident. How can we tell this package to download without using the proxy as it used to (for this non-apt transaction)?

Steve Langasek (vorlon) wrote :

Ok. Sorry about this; the reasoning here had been that:

 - the desktop network configuration interface syncs the apt proxy settings with the general <proto>_proxy env variables, so in the common case these are the same
 - the flashplugin-installer package has already been looking at the apt proxy settings rather than the http_proxy variable for some time, and nobody seems to have complained
 - sudo is known not to pass http_proxy settings in the environment (for good reason), so users who *do* need a proxy for all http downloads are advised to configure this via the apt proxy settings so that it's applied consistently.

However, this is the second report I've seen of the new proxy behavior being a problem (though I've mislaid the first report), which tells me this is not a winning solution. I'll fix this ASAP to use $http_proxy instead, which seems to be the lesser evil - given that users can always manually set http_proxy if needed, but have no way to selectively un-set the apt proxy for non-apt downloads.

affects: msttcorefonts (Ubuntu) → update-notifier (Ubuntu)
Changed in update-notifier (Ubuntu):
importance: Undecided → High
milestone: none → ubuntu-12.04
status: Incomplete → Triaged
Steve Langasek (vorlon) on 2012-04-13
Changed in update-notifier (Ubuntu):
status: Triaged → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-notifier - 0.119ubuntu7

---------------
update-notifier (0.119ubuntu7) precise; urgency=low

  * Use <proto>_proxy environment variables to choose the proxy to use for
    data downloads, not the apt proxy settings, because apt may be
    configured to point at a package-specific proxy. This makes proxy
    configuration a little less convenient than before for the
    flashplugin-installer package, but it at least it makes it possible to
    have a different proxy setting for packages vs. arbitrary data
    downloads, which otherwise we don't have any way to support.
    LP: #979477.
  * Stop processing after a fatal download error, not just a transient one,
    so that we can't be tricked into feeding a partial list of files to a
    handler. Thanks to Kees Cook for spotting the bug. LP: #979426.
  * Flush stdout before calling subprocess, so that log output makes more
    sense.
  * Print a more meaningful status message when downloading, instead of just
    a bare URL.
  * Check for existence of /usr/lib/update-notifier/package-data-downloader
    before trying to run it from our cron job, so that the package doesn't
    generate error messages when removed but not purged.
  * The action for our notification should call gksu instead of trying to
    run the command directly without root access. This is imperfect because
    kubuntu won't have gksudo available by default, but it's an improvement
    over failing for everybody. LP: #976761.
 -- Steve Langasek <email address hidden> Fri, 13 Apr 2012 03:49:10 +0000

Changed in update-notifier (Ubuntu):
status: Fix Committed → Fix Released
Johnny (jfin) wrote :
Download full text (4.7 KiB)

Hi. I was having this problem before I updated to "update-notifier - 0.119ubuntu7", but it seems like the problem is still there for me even after the update. I just installed yesterday Ubuntu Server 12.04 beta 2 64 bit + kubuntu-desktop on top of it. Got the same message window "packages requested additional data downloads after package installation, but the data could not be downloaded" for ttf-mscorefonts-installer and also flashplugin-installer when trying to install kubuntu-restricted-extras from the Muon Package Manager.
When I press "Run this action now" in the message window, a bash shell opens up with the following lines:

Warning: Could not find 'gksudo', starting '/bin/bash' instead. Please check your profile settings.

/usr/lib/update-notifier/package-data-downloader: line 3: Process new requests to download per-package data: command not found
/usr/lib/update-notifier/package-data-downloader: line 19: import: command not found
/usr/lib/update-notifier/package-data-downloader: line 20: import: command not found
/usr/lib/update-notifier/package-data-downloader: line 21: import: command not found
/usr/lib/update-notifier/package-data-downloader: line 22: import: command not found
/usr/lib/update-notifier/package-data-downloader: line 23: import: command not found
/usr/lib/update-notifier/package-data-downloader: line 24: import: command not found
/usr/lib/update-notifier/package-data-downloader: line 25: import: command not found
/usr/lib/update-notifier/package-data-downloader: line 26: import: command not found
/usr/lib/update-notifier/package-data-downloader: line 27: import: command not found
/usr/lib/update-notifier/package-data-downloader: line 28: import: command not found
/usr/lib/update-notifier/package-data-downloader: line 29: import: command not found
from: can't read /var/mail/datetime
/usr/lib/update-notifier/package-data-downloader: line 32: DATADIR: command not found
/usr/lib/update-notifier/package-data-downloader: line 33: STAMPDIR: command not found
/usr/lib/update-notifier/package-data-downloader: line 34: NOTIFIER_SOURCE_FILE: command not found
/usr/lib/update-notifier/package-data-downloader: line 35: NOTIFIER_FILE: command not found
/usr/lib/update-notifier/package-data-downloader: line 36: NOTIFIER_PERMANENT_SOURCE_FILE: command not found
/usr/lib/update-notifier/package-data-downloader: line 37: NOTIFIER_PERMANENT_FILE: command not found
/usr/lib/update-notifier/package-data-downloader: line 39: failures: command not found
/usr/lib/update-notifier/package-data-downloader: line 40: permanent_failures: command not found
/usr/lib/update-notifier/package-data-downloader: line 42: syntax error near unexpected token `('
/usr/lib/update-notifier/package-data-downloader: line 42: `def create_or_update_stampfile(file):'

The "Run this action now" button is grayed out after that, and the message window stays there until I press "Close" in it. Ttf and Flash are not installed after that. Reinstall from Muon repeates this message.

Here are some lines from /var/log/apt/term.log related to ttf and flash plugin:

Processing triggers for man-db ...
Processing triggers for libglib2.0-0 ...
Processing triggers for fontconfig ...

Read more...

Steve Langasek (vorlon) wrote :

Johnny, the issue you're seeing is not this bug; this bug is only about apt proxy settings being applied in cases where admins are not prepared to have them applied.

> Warning: Could not find 'gksudo', starting '/bin/bash' instead. Please
> check your profile settings.

This is because gksudo is not included in Kubuntu. A known issue with the previous upload; I've filed this as bug #982032.

Your real issue is that the download failed at all at package install time.

ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/andale32.exe
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 239, in retrieve
    fp = self.open(url, data)
  File "/usr/lib/python2.7/urllib.py", line 197, in open
    name = 'open_' + urltype
TypeError: cannot concatenate 'str' and 'NoneType' objects
flashplugin-installer: downloading http://archive.canonical.com/pool/partner/a/adobe-flashplugin/adobe-flashplugin_11.2.202.228.orig.tar.gz
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 239, in retrieve
    fp = self.open(url, data)
  File "/usr/lib/python2.7/urllib.py", line 197, in open
    name = 'open_' + urltype
TypeError: cannot concatenate 'str' and 'NoneType' objects

I have not seen this error here. It's a very strange error, as it suggests that python's urllib was unable to parse the url that was passed to it - the same url that's shown immediately above the failure in the output.

Please file a separate bug report against the update-notifier package by running the command 'ubuntu-bug update-notifier' from the affected system, so we can capture information about anything that may be wrong with your python installation.

Arup (arup-chowdhury) wrote :
Download full text (3.5 KiB)

I have the exact issue on my Quantal 12.10x64 as described by Steve above

sudo apt-get install ttf-mscorefonts-installer
[sudo] password for arup:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  cabextract
The following NEW packages will be installed:
  cabextract ttf-mscorefonts-installer
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/70.1 kB of archives.
After this operation, 281 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Preconfiguring packages ...
Selecting previously unselected package cabextract.
(Reading database ... 142546 files and directories currently installed.)
Unpacking cabextract (from .../cabextract_1.4-3_amd64.deb) ...
Selecting previously unselected package ttf-mscorefonts-installer.
Unpacking ttf-mscorefonts-installer (from .../ttf-mscorefonts-installer_3.4ubuntu3_all.deb) ...
Processing triggers for man-db ...
Processing triggers for fontconfig ...
Processing triggers for update-notifier-common ...
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/andale32.exe
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 239, in retrieve
    fp = self.open(url, data)
  File "/usr/lib/python2.7/urllib.py", line 207, in open
    return getattr(self, name)(url)
  File "/usr/lib/python2.7/urllib.py", line 358, in open_http
    return self.http_error(url, fp, errcode, errmsg, headers)
  File "/usr/lib/python2.7/urllib.py", line 371, in http_error
    result = method(url, fp, errcode, errmsg, headers)
  File "/usr/lib/python2.7/urllib.py", line 664, in http_error_301
    return self.http_error_302(url, fp, errcode, errmsg, headers, data)
  File "/usr/lib/python2.7/urllib.py", line 634, in http_error_302
    data)
  File "/usr/lib/python2.7/urllib.py", line 660, in redirect_internal
    return self.open(newurl)
  File "/usr/lib/python2.7/urllib.py", line 207, in open
    return getattr(self, name)(url)
  File "/usr/lib/python2.7/urllib.py", line 358, in open_http
    return self.http_error(url, fp, errcode, errmsg, headers)
  File "/usr/lib/python2.7/urllib.py", line 371, in http_error
    result = method(url, fp, errcode, errmsg, headers)
  File "/usr/lib/python2.7/urllib.py", line 634, in http_error_302
    data)
  File "/usr/lib/python2.7/urllib.py", line 660, in redirect_internal
    return self.open(newurl)
  File "/usr/lib/python2.7/urllib.py", line 207, in open
    return getattr(self, name)(url)
  File "/usr/lib/python2.7/urllib.py", line 344, in open_http
    h.endheaders(data)
  File "/usr/lib/python2.7/httplib.py", line 958, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 818, in _send_output
    self.send(msg)
  File "/usr/lib/python2.7/httplib.py", line 780, in send
    self.connect()
  File ...

Read more...

Justin (justin-acklin) wrote :

I am also encountering this. Clean install Kubuntu 12.10. Install the ttf-mscorefonts-extra by hand, accepted the EULA, etc. The fonts are available for use on my system confirmed multiple ways. But I continue to get this annoying notification that the install of it has failed.

This also affects ubuntu raring 13.04 amd64 (i did a clean install). Simple fix (since many past distributions) has been to do the following:

sudo su
export http_proxy=http://username:password@proxyhost:port
apt-get install --reinstall ttf-mscorefonts-installer

I dont know why this still affects raring, as the status of this bug report is "fix released".

dcuartielles (dcuartielles) wrote :

I confirm this bug is still active in clean installations of Ubuntu 13.10, and that the method proposed by BKD on comment #11 works

Jesús Morales (jesusmorales) wrote :

I have this issue in ubuntu 14.04, I tried the fix on #11 and it seems to have worked so far.

frednet (andrew-walker27) wrote :

I'm getting this error on 14.04 as well, ttf-mscorefonts-installer actually downloads and installs fonts correctly but I still get the error every time I log in. here's the install output and all seems ok so I don't know what it's complaining about?

All done, no errors.
Extracting cabinet: /tmp/tmp4iY7wz.exe
  extracting fontinst.exe
  extracting Webdings.TTF
  extracting fontinst.inf
  extracting Licen.TXT

All done, no errors.
All fonts downloaded and installed.

In my case I had forgotten that I block exe files at the firewall/gateway.
Once I allowed exe files to download, the install finished correctly. Hope this helps.

Xvani (fredrile+launchpad) wrote :

Still there in 14.10.... Clean install alpha 2 with all updates

Launchpad bug #1607535 is fixed in the upstream ttf-mscorefonts-installer (v3.6) but at the time of this answer it hasn't been merged into Ubuntu's repositories.

Check on Launchpad whether version 3.6 was made available for your Ubuntu release. If that's the case, just update the repository information and your packages:

sudo apt update
sudo apt upgrade -f ttf-mscorefonts-installer
This tells Apt to
install or upgrade ttf-mscorefonts-installer to the newest available version,
upgrade all packages that can be replaced trivially by a new version, and
try to fix all inconsistent packages in the process (-f).
If version 3.6 is not available for your Ubuntu release you can download the Debian package and install it with Software Center or on the command-line

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

Other bug subscribers