Bug#246818: Really using VARTEXMF?
Hi,
I have again thought about the issue, and coded a little. Here is what I
came to:
The link from /usr/share/texmf/web2c to /var/lib/texmf/web2c was
probably introduced when VARTEXMF either didn't exist at all or didn't
work for our purposes.
Why not completely drop this link and properly separate VARTEXMF and
TEXMFMAIN? This would mean that the pool files we ship in the deb are
put into $TEXMFMAIN/web2c, and everything that is generated is in
$VARTEXMF/web2c.
The symlinks for texmf.cnf and mktex.cnf should then also be in VARTEXMF
(actually for texmf.cnf this is necessary, and for mktex.cnf I only
noticed it while writing this mail).
Here's an updated patch for tetex-bin. It still contains some other
things not really related to the change in usage of VARTEXMF. As soon as
I have sent this mail, I will convert my CVS working copy to a
pre-VARTEXMF state and then test those in isolation, and commit them if
possible.
So here comes the updated patch, regards, Frank
diff --exclude-from=nodiff -u tetex-bin-2.0.2-CVS/debian/dirs tetex-bin-CVS/debian/dirs
--- tetex-bin-2.0.2-CVS/debian/dirs Sat Mar 20 08:32:54 2004
+++ tetex-bin-CVS/debian/dirs Sat May 8 17:28:51 2004
@@ -5,3 +5,5 @@
etc/texmf/texmf.d
var/lib/texmf
usr/share/tetex-bin
+usr/share/texmf/tex/generic/config/
+
Common subdirectories: tetex-bin-2.0.2-CVS/debian/md5sums and tetex-bin-CVS/debian/md5sums
Common subdirectories: tetex-bin-2.0.2-CVS/debian/patches and tetex-bin-CVS/debian/patches
Common subdirectories: tetex-bin-2.0.2-CVS/debian/po and tetex-bin-CVS/debian/po
diff --exclude-from=nodiff -u tetex-bin-2.0.2-CVS/debian/postinst tetex-bin-CVS/debian/postinst
--- tetex-bin-2.0.2-CVS/debian/postinst Tue Apr 13 17:58:22 2004
+++ tetex-bin-CVS/debian/postinst Thu May 20 13:45:17 2004
@@ -80,8 +80,8 @@
fi
fi
# first remove obsolete web2c directory if it exist
-if [ -d /usr/share/texmf/web2c ]; then rm -rf /usr/share/texmf/web2c; fi
-ln -sf /var/lib/texmf/web2c /usr/share/texmf/
+# if [ -d /usr/share/texmf/web2c ]; then rm -rf /usr/share/texmf/web2c; fi
+# ln -sf /var/lib/texmf/web2c /usr/share/texmf/
# should remove at purge; ${ETXMFC}.dpkg-old ${EFMTUC}.dpkg-old (tetex-bin)
# ${EUMAPC}.dpkg-old ${ELDAT}.dpkg-old (tetex-base?)
@@ -188,6 +188,7 @@
# handling of language.dat
###########################################
+
# first some helper function. The real action begins at the next db_get.
uncomment_ldat(){
pattern="$1"
@@ -525,20 +526,8 @@
fi
fi
# with or without debconf managment of language.dat, we have to make the link
-#
-# Check whether it is yet there
-if [ -L ${LDATD}/language.dat ]; then
- # remove it (no need to check whether it is yet correct, it's
- # simpler this way)
- rm ${LDATD}/language.dat
-else
- # is there a file language.dat where we want the link to be?
- if [ -f ${LDATD}/language.dat ]; then
- mv -f ${LDATD}/language.dat ${LDATD}/language.dat.$MOVE_EXT
- fi
-fi
-# now make the link. We do this without a further check, if it was
-(cd ${LDATD} ; ln -s ${LDAT} .)
+# (Now installed in the deb 2004-05-08, frank)
+#(cd ${LDATD} ; ln -s ${LDAT} .)
###########################################
# end of handling of language.dat
@@ -562,7 +551,7 @@
# this would be right thing to do
if [ -f ${VUMAPC} -a -x /usr/bin/updmap ]; then
MAPTEMP=`tempfile -p updm`
- /usr/bin/updmap --outputdir /etc/texmf/dvips 2> ${MAPTEMP}
+ /usr/bin/updmap 2> ${MAPTEMP}
echo "Output of updmap is in ${MAPTEMP}"
else
echo "updmap.cfg seemed lost by accident!"
diff --exclude-from=nodiff -u tetex-bin-2.0.2-CVS/debian/postrm tetex-bin-CVS/debian/postrm
--- tetex-bin-2.0.2-CVS/debian/postrm Wed Apr 14 13:25:48 2004
+++ tetex-bin-CVS/debian/postrm Thu May 20 13:54:40 2004
@@ -5,10 +5,13 @@
TEXMFD=/etc/texmf/texmf.d
FMTD=/etc/texmf/fmt.d
VLDAT=/var/lib/texmf/language.dat
+VARWEB2C=/var/lib/texmf/web2c
TEXMFD_UCF="05TeXMF.cnf 15Plain.cnf 45TeXinputs.cnf 55Fonts.cnf 65BibTeX.cnf \
75DviPS.cnf 85Misc.cnf 90TeXDoc.cnf 95NonPath.cnf"
-rm -f /usr/lib/texmf/web2c /usr/share/texmf/web2c || true
+# old directories
+#rm -f /usr/lib/texmf/web2c /usr/share/texmf/web2c || true
+rm -f /usr/lib/texmf/web2c || true
# this is borrowed from Tore Andersons LRRD packages
purge_ucf_file () {
@@ -31,7 +34,12 @@
# purge texmf.cnf which is generated by update-texmf using ucf:
purge_ucf_file ${TEXMFC}
- rm -f ${FMTCNF}* ${VLDAT}*
+ rm -f ${FMTCNF}* || true #${VLDAT}*
+ rm -r $VARWEB2C/*log $VARWEB2C/*fmt $VARWEB2C/*efmt $VARWEB2C/*oft $VARWEB2C/*mem $VARWEB2C/*base || true
+ rm -r $VARWEB2C/fmtutil.cnf $VARWEB2C/updmap.cfg || true
+ rm -r $VARWEB2C || true
+ rm -r /var/lib/texmf/helpindex.html /var/lib/texmf/ls-R /var/lib/texmf/ls-R-TEXMFMAIN || true
+ rm -r /var/lib/texmf || true
# rm -rf ${TEXMFD} ## this could delete configuration files of other packages
# rm -rf ${FMTD} ## this could delete configuration files of other packages
rm -rf /var/lib/texmf/web2c
diff --exclude-from=nodiff -u tetex-bin-2.0.2-CVS/debian/preinst tetex-bin-CVS/debian/preinst
--- tetex-bin-2.0.2-CVS/debian/preinst Wed Apr 14 12:46:11 2004
+++ tetex-bin-CVS/debian/preinst Thu May 20 12:22:27 2004
@@ -24,6 +24,7 @@
file=/usr/share/texmf/tex/latex/graphics/dvipdfm.def
ETM=/etc/texmf
VARW=/var/lib/texmf/web2c
+OLD_WEB2C=/usr/share/texmf/web2c
case "$1" in
install|upgrade)
@@ -42,6 +43,7 @@
dpkg-divert --package dvipdfm --remove --rename \
--divert ${file}.tetex ${file}
fi
+ if [ -L $OLD_WEB2C ]; then rm $OLD_WEB2C; fi
;;
diff --exclude-from=nodiff -u tetex-bin-2.0.2-CVS/debian/rules tetex-bin-CVS/debian/rules
--- tetex-bin-2.0.2-CVS/debian/rules Tue May 11 20:58:33 2004
+++ tetex-bin-CVS/debian/rules Wed May 19 15:54:11 2004
@@ -99,11 +99,14 @@
#tetex-bin install
make install prefix=`pwd`/debian/$(package)/usr texmf=`pwd`/$(txmfdir)
make strip prefix=`pwd`/debian/$(package)/usr
+ # create a web2c directory in $VARTEXMF
+ mkdir $(debvar)/web2c
# move web2c to var
- cp -a $(txmfdir)/web2c $(debvar)
- rm -fr $(txmfdir)/web2c
- rm -f $(debvar)/web2c/mktex.cnf
- (cd $(txmfdir)/; ln -s $(vardir)/web2c .)
+ # cp -a $(txmfdir)/web2c $(debvar)
+ # only remove dir contents, not the directory, and don't create a symlink
+ # rm -f $(txmfdir)/web2c/*
+ rm -f $(txmfdir)/web2c/mktex.cnf
+ #(cd $(txmfdir)/; ln -s $(vardir)/web2c .)
rm -f $(sharedir)/info/dir*
# replace xdvi with Debian version
cp -f debian/xdvi-pl debian/$(package)/usr/bin/xdvi
@@ -168,16 +171,16 @@
mkdir -p $(sharedir)/emacs/site-lisp/
cp texk/web2c/cwebdir/cweb.el $(sharedir)/emacs/site-lisp/
# update-texmf stuffs #########
- mv -f $(debvar)/web2c/texmf.cnf $(sharedir)/tetex-bin
+ mv -f $(txmfdir)/web2c/texmf.cnf $(sharedir)/tetex-bin
# these files are handled by ucf
cp texmf.d/*.cnf $(sharedir)/$(package)
cp -a debian/md5sums/*md5sum* $(sharedir)/$(package)
install -m 755 debian/update-texmf debian/$(package)/usr/sbin
- (cd $(debvar)/web2c/; ln -s $(etcdir)/texmf.cnf .)
+ (cd $(txmfdir)/web2c/; ln -s $(etcdir)/texmf.cnf .)
cp debian/update-texmf.8 $(sharedir)/man/man8/
# update-fmtutil stuffs #########
- cp $(debvar)/web2c/fmtutil.cnf $(debetc)/fmt.d/00tetex.cnf
- mv $(debvar)/web2c/fmtutil.cnf $(sharedir)/tetex-bin
+ cp $(txmfdir)/web2c/fmtutil.cnf $(debetc)/fmt.d/00tetex.cnf
+ mv $(txmfdir)/web2c/fmtutil.cnf $(sharedir)/tetex-bin
install -m 755 debian/update-fmtutil debian/$(package)/usr/sbin
#(cd $(debvar)/web2c/; ln -s $(etcdir)/fmtutil.cnf .)
# install -m 644 texk/kpathsea/mktex.cnf $(debetc)/
@@ -188,6 +191,8 @@
cp debian/update-updmap.8 $(sharedir)/man/man8/
#the warning for texdoctk
install debian/texdoctk-warn debian/$(package)/usr/bin
+# install language.dat link in the deb, don't create it in postinst
+ (cd $(txmfdir)/tex/generic/config/; ln -s /etc/texmf/language.dat .)
#libkpathsea-dev installer
mkdir -p debian/$(subdev)/usr/share/doc
--
Frank Küster, Biozentrum der Univ. Basel
Abt. Biophysikalische Chemie
Reply to: