Package: icedove Version: 1:45.8.0-2 Followup-For: Bug #858771 Dear Maintainer,
i was going to report that thunderbird fails to start if: ${HOME}/.thunderbird is a symlink to ${HOME}/.iceweasel AND ${HOME} is a symlink itself. the reason being that `readlink -e` is resolving both the .thunderbird symlink and the ${HOME} symlink, thus invalidating the comparision (${HOME} != expanded ${HOME}). it seems that the fix proposed by thomas fixes this. one more note though (i haven't had a look at the pending upload so it might be obsolete): i think you can simplify the logic quite a bit from checking whether one if ${ID_PROFILE_FOLDER} resp ${TB_PROFILE_FOLDER} is a directory and the other a symlink pointing to it AND vice-versa, to just do a single comparision whether they actually resolve to the same path (not caring about which of the two is the real directory; also allowing for both to be a symlink to some 3rd directory) resp. that they don't resolve to the same path. see attachment
--- thunderbird.org 2017-03-28 14:54:38.528598030 +0200 +++ thunderbird 2017-03-28 14:59:31.602320302 +0200 @@ -164,10 +164,12 @@ # We found both profile folder, and .thunderbird is a symlink, # we need to check if .thunderbird is symlinked to .icedove -if { [ -d "${ID_PROFILE_FOLDER}" ] && [ -L "${TB_PROFILE_FOLDER}" ]; } && \ - [ "$(readlink -e "${TB_PROFILE_FOLDER}")" = "${ID_PROFILE_FOLDER}" ];then +if { [ -d "${ID_PROFILE_FOLDER}" ] || [ -L "${ID_PROFILE_FOLDER}" ]; } && \ + { [ -d "${TB_PROFILE_FOLDER}" ] || [ -L "${TB_PROFILE_FOLDER}" ]; }; then - output_debug "Found folder ${ID_PROFILE_FOLDER}, found a symlink ${TB_PROFILE_FOLDER} pointing to ${ID_PROFILE_FOLDER}" + if [ "$(readlink -e "${TB_PROFILE_FOLDER}")" = "$(readlink -e "${ID_PROFILE_FOLDER}")" ];then + + output_debug "Both ${ID_PROFILE_FOLDER} and ${TB_PROFILE_FOLDER} resolve to $(readlink -e ${ID_PROFILE_FOLDER})" # Check if we need to do some migration, the linking could be existing # before we switched back to Thunderbird. @@ -180,31 +182,11 @@ do_migrate_old_icedove_desktop fi -# ... or the opposite if .icedove is symlinked to .thunderbird -elif { [ -d "${TB_PROFILE_FOLDER}" ] && [ -L "${ID_PROFILE_FOLDER}" ]; } && \ - [ "$(readlink -e "${ID_PROFILE_FOLDER}")" = "${TB_PROFILE_FOLDER}" ];then - - output_debug "Found folder ${TB_PROFILE_FOLDER}, found a symlink ${ID_PROFILE_FOLDER} pointing to ${TB_PROFILE_FOLDER}" - output_debug "You may want to remove the symlink ${ID_PROFILE_FOLDER}? It's probably not needed anymore." - - # Check if we need to do some migration ... - if [ ! -f "${TB_PROFILE_FOLDER}/.migrated" ]; then - # Fixing mimeTypes.rdf which may have registered the iceweasel binary - # as browser, instead of x-www-browser - do_fix_mimetypes_rdf - - # Fix local mimeapps.list and *.desktop entries - do_migrate_old_icedove_desktop - fi - # We found both profile folder, but they are not linked to each other! This # is a state we can't solve on our own !!! The user needs to interact and # has probably an old or otherwise used Thunderbird installation. Which one # is the correct one to use? -elif { [ -d "${ID_PROFILE_FOLDER}" ] || [ -L "${ID_PROFILE_FOLDER}" ]; } && \ - { [ -d "${TB_PROFILE_FOLDER}" ] || [ -L "${TB_PROFILE_FOLDER}" ]; } && \ - [ "$(readlink -e "${TB_PROFILE_FOLDER}")" != "${ID_PROFILE_FOLDER}" ]; then - + elif [ "$(readlink -e "${TB_PROFILE_FOLDER}")" != "$(readlink -e "${ID_PROFILE_FOLDER}")" ];then for CHECK in ${ID_PROFILE_FOLDER} ${TB_PROFILE_FOLDER}; do FILE_CHECK=$(readlink -e "${CHECK}") if [ "${FILE_CHECK}" != "" ] && [ -L "${CHECK}" ]; then @@ -225,6 +207,7 @@ # display a graphical advice if possible do_thunderbird2icedove_error_out + fi fi if [ "${FAIL}" = 1 ]; then