reassign 343545 arabtex tags 343545 patch thanks Hi Clint,
Frank Küster <[EMAIL PROTECTED]> wrote: > It's a bug in arabtex, but in fact it's the code > that Norbert and I suggested that causes the problem. This is what > happens: > > - arabtex 3.11-7 has its map file in /etc/texmf/dvips/map/arabtex.map, > and an updmap.cfg snippet in /etc/texmf/updmap.d/10arabtex.cfg that > references that map file. But the magic comment is missing in > 10arabtex.cfg in 3.11-7 > > - before arabtex is unpacked, the preinst detects that arabtex.map is > unchanged and removes it > > - arabtex and the tetex apckages are unpacked, the new arabtex.map is > still arabtex.map.dpkg-new, and the new 10arabtex.cfg (with the magic > comment) is still 10arabtex.cfg.dpkg-new, while the old 10arabtex.cfg > is still there > > - tetex-bin is configured and runs update-updmap and updmap, and now it > looks for arabtex.map but cannot find it. > > So far for the analysis. I don't have enough time to think of a clean > solution. Maybe, since the conffile placements change, anyway, we > should do the removals and moves in postinst? Not the moves, since then we would overwrite the conffiles after dpkg has moved them from *.dpkg-new to the real name, but we can keep the old file until the postinst is run; we just have to remove it before updmap is called. So I propose the attached patch, and we should document this in the TeX Policy, too. Regards, Frank -- Frank Küster Inst. f. Biochemie der Univ. Zürich Debian Developer
diff -Nur arabtex-3.11.orig/debian/postinst arabtex-3.11/debian/postinst --- arabtex-3.11.orig/debian/postinst 2005-12-17 11:23:57.392918104 +0100 +++ arabtex-3.11/debian/postinst 2005-12-16 18:10:21.000000000 +0100 @@ -13,8 +13,22 @@ return 0 } +remove_oldconffile(){ + file="$1" + dir=`dirname $file` + if [ -f $file ]; then + echo "Removing obsolete, unchanged conffile $file" + rm $file + fi + rmdir $dir 2>/dev/null || true +} + case "$1" in - configure|abort-upgrade|abort-remove|abort-deconfigure) + configure) + remove_oldconffile /etc/texmf/dvips/arabtex.map + update_fontmaps + ;; + abort-upgrade|abort-remove|abort-deconfigure) update_fontmaps ;; diff -Nur arabtex-3.11.orig/debian/preinst arabtex-3.11/debian/preinst --- arabtex-3.11.orig/debian/preinst 2005-12-17 11:23:57.392918104 +0100 +++ arabtex-3.11/debian/preinst 2005-12-17 11:25:35.374022712 +0100 @@ -12,8 +12,7 @@ oldloc=`dirname $1` newmd5sum=`md5sum $oldfile | cut -d ' ' -f 1` if [ "$newmd5sum" = "$oldmd5sum" ] ; then - echo "Removing obsolete, unchanged conffile $oldfile" - rm $oldfile + : else if [ "X$newloc" = "X" ] ; then echo "Conffile $oldfile was changed, leaving it at the same place"