tags 399670 patch
thanks

ok i've done some more investigation

the problem appears to be caused by there being something in 
/etc/firefox/profile that wasn't put there by dpkg and so doesn't
get removed by dpkg. The result of this is that dpkg purges the 
files it installed but leaves the directories in place.

it then seems that the firefox->iceweasel migration code spots 
the directories and tries to migrate your configuration. However it
then fails to rename files that don't exist in the copied config

based on that investigation work i started looking for the source 
of the problem, i found the migration code in the preinst script
and have modified it to check files actually exist before renaming
them, this should solve the problem (i have not tested the fix because
iceweasel fails to build on my box, probablly due to a lack of memory).


steps to reproduce (some steps may not actually be needed but this sequence 
seems to work)

1: make sure apt-utils is installed (i only mention this because i installed it 
while trying to reproduce, no idea if its actually needed or not)
2: remove and purge any existing firefox or iceweasel packages
3: apt-get install libgconf2-4 libgnome2-0 libgnomeui-0 libgnomevfs2-0
4: rm -rf /usr/lib/firefox /usr/lib/iceweasel /etc/firefox /etc/iceweasel

5: dpkg -i firefox_1.5.dfsg+1.5.0.7-2_i386.deb 
firefox-gnome-support_1.5.dfsg+1.5.0.7-2_i386.deb
6: touch /etc/firefox/profile/dummy
7: apt-get install iceweasel iceweasel-gnome-support firefox-gnome-support- 
firefox- --purge

below is a log in english :)

debian:/# dpkg -i firefox_1.5.dfsg+1.5.0.7-2_i386.deb 
firefox-gnome-support_1.5.dfsg+1.5.0.7-2_i386.deb
Selecting previously deselected package firefox.
(Reading database ... 21057 files and directories currently installed.)
Unpacking firefox (from firefox_1.5.dfsg+1.5.0.7-2_i386.deb) ...
Selecting previously deselected package firefox-gnome-support.
Unpacking firefox-gnome-support (from 
firefox-gnome-support_1.5.dfsg+1.5.0.7-2_i386.deb) ...
Setting up firefox (1.5.dfsg+1.5.0.7-2) ...
Please restart any running Firefoxes, or you will experience problems.

Setting up firefox-gnome-support (1.5.dfsg+1.5.0.7-2) ...

debian:/# touch /etc/firefox/profile/dummy
debian:/# apt-get install iceweasel iceweasel-gnome-support 
firefox-gnome-support- firefox- --purge
Reading package lists... Done
Building dependency tree... Done
Suggested packages:
  latex-xft-fonts xprint mozplugger
The following packages will be REMOVED
  firefox* firefox-gnome-support*
The following NEW packages will be installed
  iceweasel iceweasel-gnome-support
0 upgraded, 2 newly installed, 2 to remove and 0 not upgraded.
Need to get 0B/9010kB of archives.
After unpacking 2892kB of additional disk space will be used.
Do you want to continue [Y/n]?
(Reading database ... 22351 files and directories currently installed.)
Removing firefox-gnome-support ...
Removing firefox ...
Purging configuration files for firefox ...
dpkg - warning: while removing firefox, directory `/etc/firefox/profile' not 
empty so not removed.
dpkg - warning: while removing firefox, directory `/etc/firefox' not empty so 
not removed.
Selecting previously deselected package iceweasel.
(Reading database ... 21057 files and directories currently installed.)
Unpacking iceweasel (from .../iceweasel_2.0+dfsg-1_i386.deb) ...
mv: cannot stat `/etc/iceweasel/firefoxrc': No such file or directory
dpkg: error processing /var/cache/apt/archives/iceweasel_2.0+dfsg-1_i386.deb 
(--unpack):
 subprocess pre-installation script returned error exit status 1
Selecting previously deselected package iceweasel-gnome-support.
Unpacking iceweasel-gnome-support (from 
.../iceweasel-gnome-support_2.0+dfsg-1_i386.deb) ...
Errors were encountered while processing:
 /var/cache/apt/archives/iceweasel_2.0+dfsg-1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
debian:/#

Attachment: iceweasel.preinst
Description: Binary data

Reply via email to