My ongoing experiences with Ubuntu, and later Mythbuntu, as a media center with MythTV. I'm also using the system for a virtual machine server, a mediawiki server and a general all around home infrastructure base.

Sunday, May 3, 2009

ttf-mscorefonts-installer, apt-cacher and .exe files

Since upgrading to 9.04 I was still having problems upgrading ttf-mscorefonts-installer. The 'apt-get dist-upgrade' would die with the following error:

--2009-05-03 12:00:35-- http://heanet.dl.sourceforge.net/sourceforge/corefonts/andale32.exe
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:3142... connected.
Proxy request sent, awaiting response... 403 Sorry, not allowed to fetch that type of file: andale32.exe
2009-05-03 12:00:36 ERROR 403: Sorry, not allowed to fetch that type of file: andale32.exe.
Poking around, I found this post which explained that apt-cacher had a list of allowed file types and '.exe' wasn't on it. Unforunately, the apt-cacher script had changed and the patch in the post wasn't relevant any more. Here is my fix:
#cd /usr/share/apt-cacher
#cp apt-cacher-lib.pl apt-cacher-lib.pl.20090503
#vi apt-cacher-lib.pl
# diff -c apt-cacher-lib.pl.20090503 apt-cacher-lib.pl
*** apt-cacher-lib.pl.20090503 2009-05-03 12:06:48.000000000 -0500
--- apt-cacher-lib.pl 2009-05-03 12:07:15.000000000 -0500
***************
*** 57,62 ****
--- 57,63 ----
package_files_regexp => '(?:' . join('|',
('\.deb',
'\.rpm',
+ '\.exe',
'\.dsc',
'\.tar\.gz',
'\.diff\.gz',


The I restarted apt-cacher:
# /etc/init.d/apt-cacher restart
Then I reran 'apt-get dist-upgrade' and it installed fine.

No comments: