package-data-downloader tries to remove non-existant file, failing with Errno 2

Bug #1425118 reported by Doug Arnold
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
update-notifier (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

In Ubuntu 14.10, installations of various packages fail due to package-data-downloader trying to remove a file that does not exist. See

  https://bugs.launchpad.net/ubuntu/+source/msttcorefonts/+bug/1354709

for examples when trying to install the msttcorefonts package (see bug descriptions) and when trying to install the wine-browser-installer package (see comments #10 and #11)

A very simple patch is to check if the file exists before calling os.remove to remove it. Specifically, replace line 260 of /usr/lib/update-notifier/package-data-downloader:

                         os.remove(f)

with the two lines

                         if os.path.exists(dest_file):
                            os.remove(f)

With this change I can install wine-browser-installer without error. Otherwise I cannot.

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: update-notifier 3.157
ProcVersionSignature: Ubuntu 3.16.0-30.40-generic 3.16.7-ckt3
Uname: Linux 3.16.0-30-generic i686
NonfreeKernelModules: nvidia
ApportVersion: 2.14.7-0ubuntu8.2
Architecture: i386
CurrentDesktop: XFCE
Date: Tue Feb 24 08:59:59 2015
SourcePackage: update-notifier
UpgradeStatus: Upgraded to utopic on 2015-02-21 (2 days ago)

Revision history for this message
Doug Arnold (dnarnold) wrote :
Revision history for this message
Doug Arnold (dnarnold) wrote :

I apologize for a typo in the patch in my bug description. The additional lines should, of course, be

                          if os.path.exists(f):
                              os.remove(f):

("f" not "dest_file").

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in update-notifier (Ubuntu):
status: New → Confirmed
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.