Bug#343545: tetex-bin: config fails; updmap cannot find arabtex.map

2005-12-18 Thread Frank Küster
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.0 +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


Bug#343545: tetex-bin: config fails; updmap cannot find arabtex.map

2005-12-16 Thread Frank Küster
severity 343545 important
# not reassigning to arabtex for now because it's the tex maintainers' fault
thanks

Lionel Elie Mamane [EMAIL PROTECTED] wrote:

 Package: tetex-bin
 Version: 3.0-12
 Severity: grave
 Justification: renders package unusable

Dear Lionel, 

thanks for reporting that bug; but it's not correctly rated with
grave.  arabtex.map is part of a separate package, and is only
installed by a subgroup of our users, and it clearly doesn't make the
package unusable for most of them.  

 I'm fairly sure that I haven't manually changed any tex setting on
 this computer. This is an upgrade through aptitude:

 [UPGRADE] tetex-base 3.0-10 - 3.0-11
 [UPGRADE] tetex-bin 3.0-10.1 - 3.0-12
 [UPGRADE] tetex-doc 3.0-10 - 3.0-11
 [UPGRADE] tetex-extra 3.0-10 - 3.0-11
 [UPGRADE] tethereal 0.10.12-6 - 0.10.13-1
 [UPGRADE] tex-common 0.9 - 0.13
 [UPGRADE] arabtex 3.11-7 - 3.11-9


 I suppose that if arabtex got configured, it would move arabtex.map in
 the right place and permit tetex to be configured:

Yes, you are right.  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?

Regards, Frank
-- 
Frank Küster
Inst. f. Biochemie der Univ. Zürich
Debian Developer




Bug#343545: tetex-bin: config fails; updmap cannot find arabtex.map

2005-12-16 Thread Lionel Elie Mamane
On Fri, Dec 16, 2005 at 12:53:09PM +0100, Frank Küster wrote:

 Lionel Elie Mamane [EMAIL PROTECTED] wrote:

 Package: tetex-bin
 Version: 3.0-12
 Severity: grave
 Justification: renders package unusable

 thanks for reporting that bug; but it's not correctly rated with
 grave.

That's an error. I intended for it to be important. Probably my hand
slipped between the 3 and 4 (or whatever numbers reportbug
assigns these severities in its menu).

 arabtex.map is part of a separate package, and is only installed by
 a subgroup of our users, and it clearly doesn't make the package
 unusable for most of them.

Yes, yes, I agree.

-- 
Lionel


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#343545: tetex-bin: config fails; updmap cannot find arabtex.map

2005-12-15 Thread Lionel Elie Mamane
Package: tetex-bin
Version: 3.0-12
Severity: grave
Justification: renders package unusable

Setting up tetex-bin (3.0-12) ...
Running fmtutil-sys. This may take some time. ...
Running updmap-sys. This may take some time. ...
updmap failed. Output has been stored in
/tmp/tetex.updmap.XXjoPw5b
Please include this file if you report a bug.

[EMAIL PROTECTED]:/usr/games$ ls -l /etc/texmf/fonts/map/dvips/arabtex*
-rw-r--r-- 1 root root 142 2005-12-08 19:18 
/etc/texmf/fonts/map/dvips/arabtex.map.dpkg-new

[EMAIL PROTECTED]:/usr/games$ dpkg -l arabtex
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version  Description
+++---
iU  arabtex  3.11-9   Arabic/Hebrew macros for TeX/LaTeX

[EMAIL PROTECTED]:/usr/games$ sudo dpkg --configure arabtex
dpkg: dependency problems prevent configuration of arabtex:
 arabtex depends on tetex-bin (= 3) | texlive-latex-base; however:
  Package tetex-bin is not configured yet.
  Package texlive-latex-base is not installed.
 arabtex depends on tetex-extra | texlive-latex-base; however:
  Package tetex-extra is not configured yet.
  Package texlive-latex-base is not installed.
dpkg: error processing arabtex (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 arabtex


I'm fairly sure that I haven't manually changed any tex setting on
this computer. This is an upgrade through aptitude:

[UPGRADE] tetex-base 3.0-10 - 3.0-11
[UPGRADE] tetex-bin 3.0-10.1 - 3.0-12
[UPGRADE] tetex-doc 3.0-10 - 3.0-11
[UPGRADE] tetex-extra 3.0-10 - 3.0-11
[UPGRADE] tethereal 0.10.12-6 - 0.10.13-1
[UPGRADE] tex-common 0.9 - 0.13
[UPGRADE] arabtex 3.11-7 - 3.11-9


I suppose that if arabtex got configured, it would move arabtex.map in
the right place and permit tetex to be configured:


[EMAIL PROTECTED]:/usr/games$ sudo dpkg --configure --force-depends arabtex
dpkg: arabtex: dependency problems, but configuring anyway as you request:
 arabtex depends on tetex-bin (= 3) | texlive-latex-base; however:
  Package tetex-bin is not configured yet.
  Package texlive-latex-base is not installed.
 arabtex depends on tetex-extra | texlive-latex-base; however:
  Package tetex-extra is not configured yet.
  Package texlive-latex-base is not installed.
Setting up arabtex (3.11-9) ...
Installing new version of config file /etc/texmf/updmap.d/10arabtex.cfg ...
mktexlsr: Updating /var/lib/texmf/ls-R-TEXMFMAIN...
mktexlsr: Updating /var/lib/texmf/ls-R-TEXMFDIST-TETEX...
mktexlsr: Updating /var/cache/fonts/ls-R...
mktexlsr: Updating /var/lib/texmf/ls-R...
mktexlsr: Done.
Running updmap-sys... done.

[EMAIL PROTECTED]:/usr/games$ sudo dpkg --configure --pending
Setting up tetex-bin (3.0-12) ...
Running fmtutil-sys. This may take some time. ...
Running updmap-sys. This may take some time. ... done.



-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.14-1-686
Locale: LANG=fr_LU.UTF-8, LC_CTYPE=fr_LU.UTF-8 (charmap=UTF-8)

Versions of packages tetex-bin depends on:
ii  debconf [debconf-2.0]1.4.62  Debian configuration management sy
ii  debianutils  2.15.2  Miscellaneous utilities specific t
ii  dpkg 1.13.11.0.1 package maintenance system for Deb
ii  ed   0.2-20  The classic unix line editor
ii  libc62.3.5-8.1   GNU C Library: Shared libraries an
ii  libcairo21.0.2-3 The Cairo 2D vector graphics libra
ii  libfontconfig1   2.3.2-1.1   generic font configuration library
ii  libfreetype6 2.1.10-1FreeType 2 font engine, shared lib
ii  libgcc1  1:4.0.2-5   GCC support library
ii  libice6  6.8.2.dfsg.1-11 Inter-Client Exchange library
ii  libjpeg626b-10   The Independent JPEG Group's JPEG 
ii  libkpathsea4 3.0-10.1path search library for teTeX (run
ii  libpaper11.1.14-3Library for handling paper charact
ii  libpng12-0   1.2.8rel-5  PNG library - runtime
ii  libpoppler0c20.4.2-1 PDF rendering library
ii  libsm6   6.8.2.dfsg.1-11 X Window System Session Management
ii  libstdc++6   4.0.2-5 The GNU Standard C++ Library v3
ii  libt1-5  5.1.0-2 Type 1 font rasterizer library - r
ii  libx11-6 6.8.2.dfsg.1-11 X Window System protocol client li
ii  libxaw8  6.8.2.dfsg.1-11 X Athena widget set library
ii  libxext6