[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RFP: xetex - An extension of TeX with Unicode and OpenType support

Norbert Preining <preining@logic.at> wrote:

> Hi all!
> On Fre, 25 Aug 2006, Frank Küster wrote:
>> > suppose. It should be shipped with the data.tar.gz. dh_installtex does
>> > *NOT* create the necessary symlinks. (Should it do it?)
>> If we want to do that, we should modify texlinks to accept a $DESTDIR
>> and call that one from dh_installtex.
> On Fre, 25 Aug 2006, Atsuhito Kohda wrote:
>> Only quick look, original postinst contained, among others,
>> "texlinks --silent" so I guessed removing it could be wrong.
> Ahhh. 
> Well I am against calling texlinks in the postinst and creating files
> which are *NOT* removed at remove/purge time.

Yes, this should definitely not be done.

> So: if we provide the functionality in dh_installtex, it should create the
> links by itself (without texlinks) in debian/$(package)/usr/bin
> and should NOT put code like texlinks into the postinst script.
> Or better, devs create the symlinks by themselves in the rules file.
> What do you think, which of the two options is better?

Since the symlinks and their targets can be deduced from a
"configuration file", namely the fmtutil.cnf snippet, I think it would
be a good idea to include this in dh_installtex.  However, I don't think
this is particularly important; there's probably other things to do that
are more pressing. 

The reason why I was mentioning texlinks and a DESTDIR option is that
the code for parsing fmtutil.cnf, deciding about and generating symlinks
already exists.  And I had now a short look at the code in texlinks:  I
think it has already nearly everything we need.  A call like

texlinks --cnffile debian/40Foo.cnf debian/foo/usr/bin/

would create the symlinks, just that it checks whether the targets
exist.  Here's a patch:

--- /usr/bin/texlinks   2006-08-02 16:27:58.000000000 +0200
+++ bin/texlinks        2006-08-25 13:29:08.000000000 +0200
@@ -49,6 +49,8 @@
   -s                    silently skip over existing scripts / binaries
                         instead of creating a warning
+  --allow-dangling
+  -d                    allow dangling symlinks
 directories is an optional list of directories in which to operate.
 If no directories are specified the list of directories depends on the
@@ -228,6 +230,7 @@
+  allow_dangling=false
   : ${KPSE_DOT=$thisdir}; export KPSE_DOT
   selfautoloc=`kpsewhich --expand-var='$SELFAUTOLOC'`
@@ -242,6 +245,7 @@
       --v*|-v) verbose=true;;
       --s*|-s) silent=true;;
       --m*|-m) multiplatform=true;;
+      --allow-dangling|-d) allow_dangling=true;;
       -*) errmsg "fmtutil: unknown option \`$1' ignored.";;
       *)  break;;
@@ -290,7 +294,7 @@
       test "x$fmt" = "x$engine" && continue
-      if test -f "$d/$engine"; then
+      if test -f "$d/$engine" || test "$allow_dangling" = "true"; then
         install_link "$engine" "$d/$fmt"
         verbose_echo "$d/$engine: engine does not exist. Skipping..."

Regards, Frank

Frank Küster
Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich
Debian Developer (teTeX/TeXLive)

Reply to: