[tex-k] fmtutil --noformaterror
Norbert Preining
preining at logic.at
Thu Jul 1 06:32:14 CEST 2010
Dear all, Akira, Karl
following a discussion on the TeX Live mailing list I have made some
simple changes to fmtutil to not abort on some occasions, but
just do normal cleanup and exit normally.
The command line option is
--noformaterror
The conditions under which fmtutil before did abort (exit 1) and now
does normal cleanup are:
fmtutil --byhyphen ....
no format depends on hyphen file ....
fmtutil --byengine ...
no format depends on engine ....
That is somehow in line with
$ fmtutil --byfmt foobar_not_defined_format
$ echo $?
0
$
In the above cases now we get someting like:
$ fmtutil-sys --noformaterror --byengine ptex
fmtutil: no format depends on engine `ptex'.
$ echo $?
0
$
etc.
I attach a diff to fmtutil tahat accomplishes that for review.
@Akira: I checked the sources of fmtutil.c and found that *AFAIS*
you only five a warning on stderr, but do not exit with non-zero
exit code.
If that is right, please advise on the following two options:
1- add support for that cmd line options (doing nothing), patch:
--- fmtutil.c 2010-03-10 21:09:12.000000000 +0900
+++ fmtutil.c.new 2010-07-01 13:26:28.000000000 +0900
@@ -561,6 +561,9 @@
usage();
return 0;
}
+ else if(!strncmp(av[i],"--nof", 5) || !strncmp(av[i], "-nof", 4)) {
+ /* do nothing, only for compatibility with shell fmtutil for unix */
+ }
else {
fprintf(stderr, "%s: Invalid argument.\n\n", av[0]);
usage();
2- or I add a special case for W32 in tlmgr calling
Of course I would prefer the former one, also to keep fmtutil in w32
and unix in sync, but I can also do the second.
I didn't add any help option for that, as it does nothing.
@Karl and the others: Is it fine to commit that to the texlive repository?
Best wishes
Norbert
------------------------------------------------------------------------
Norbert Preining preining@{jaist.ac.jp, logic.at, debian.org}
JAIST, Japan TeX Live & Debian Developer
DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
------------------------------------------------------------------------
LARGOWARD (n.)
Motorists' name for the kind of pedestrian who stands beside a main
road and waves on the traffic, as if it's their right of way.
--- Douglas Adams, The Meaning of Liff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fmtutil.diff
Type: text/x-diff
Size: 2663 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex-k/attachments/20100701/58e78ef7/attachment.bin>
More information about the tex-k
mailing list