Six months ago, November, 2002,
I made a security upgrade using "apt-get".
That security uprade failed for the Debian package tetex-bin,
and I have endured its nuisance messages
with dozens of apt-get's since, until today.
Following are
(1) the error messages,
(2) the problem with "mktexlsr",
(3) my 2-line SOLUTION in "mktexlsr"
that allows ls-R to have an initial size of 0, and
(4) software versions I use.
1. "apt-get install tetex-bin"
This Debian Linux command created the following output.
Notice particularly the following two lines,
warning: kpathsea: No usable entries in /usr/share/texmf/ls-R.
mktexlsr: /var/lib/texmf/ls-R lacks magic string. Skipping...
Reading Package Lists... Done
Building Dependency Tree... Done
Sorry, tetex-bin is already the newest version.
0 packages upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
1 packages not fully installed or removed.
Need to get 0B of archives. After unpacking 0B will be used.
Setting up tetex-bin (1.0.7+20011202-7.1) ...
Regenerating /etc/texmf/texmf.cnf ... done
Regenerating /etc/texmf/fmtutil.cnf ... done
warning: kpathsea: No usable entries in /usr/share/texmf/ls-R.
warning: kpathsea: See the manual for how to generate ls-R.
mktexlsr: Updating /usr/local/lib/texmf/ls-R...
mktexlsr: /var/lib/texmf/ls-R lacks magic string. Skipping...
mktexlsr: Updating /var/spool/texmf/ls-R...
mktexlsr: Done.
Running initex. This may take some time. ...
warning: kpathsea: No usable entries in /usr/share/texmf/ls-R.
warning: kpathsea: See the manual for how to generate ls-R.
warning: kpathsea: No usable entries in /usr/share/texmf/ls-R.
warning: kpathsea: See the manual for how to generate ls-R.
warning: kpathsea: No usable entries in /usr/share/texmf/ls-R.
warning: kpathsea: See the manual for how to generate ls-R.
warning: kpathsea: No usable entries in /usr/share/texmf/ls-R.
warning: kpathsea: See the manual for how to generate ls-R.
warning: kpathsea: No usable entries in /usr/share/texmf/ls-R.
warning: kpathsea: See the manual for how to generate ls-R.
warning: kpathsea: No usable entries in /usr/share/texmf/ls-R.
warning: kpathsea: See the manual for how to generate ls-R.
warning: kpathsea: No usable entries in /usr/share/texmf/ls-R.
warning: kpathsea: See the manual for how to generate ls-R.
warning: kpathsea: No usable entries in /usr/share/texmf/ls-R.
warning: kpathsea: See the manual for how to generate ls-R.
warning: kpathsea: No usable entries in /usr/share/texmf/ls-R.
warning: kpathsea: See the manual for how to generate ls-R.
warning: kpathsea: No usable entries in /usr/share/texmf/ls-R.
warning: kpathsea: See the manual for how to generate ls-R.
warning: kpathsea: No usable entries in /usr/share/texmf/ls-R.
warning: kpathsea: See the manual for how to generate ls-R.
warning: kpathsea: No usable entries in /usr/share/texmf/ls-R.
warning: kpathsea: See the manual for how to generate ls-R.
warning: kpathsea: No usable entries in /usr/share/texmf/ls-R.
warning: kpathsea: See the manual for how to generate ls-R.
warning: kpathsea: No usable entries in /usr/share/texmf/ls-R.
warning: kpathsea: See the manual for how to generate ls-R.
warning: kpathsea: No usable entries in /usr/share/texmf/ls-R.
warning: kpathsea: See the manual for how to generate ls-R.
warning: kpathsea: No usable entries in /usr/share/texmf/ls-R.
warning: kpathsea: See the manual for how to generate ls-R.
warning: kpathsea: No usable entries in /usr/share/texmf/ls-R.
warning: kpathsea: See the manual for how to generate ls-R.
Error: kpsewhich cannot find file fmtutil.cnf
dpkg: error processing tetex-bin (--configure):
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
tetex-bin
E: Sub-process /usr/bin/dpkg returned an error code (1)
2. mktexlsr
The above errors were caused by "mktexlsr", which I can run by itself,
and observe the following response,
mktexlsr: Updating /usr/local/lib/texmf/ls-R...
mktexlsr: /var/lib/texmf/ls-R lacks magic string. Skipping...
mktexlsr: Updating /var/spool/texmf/ls-R...
Notice that /usr/share/texmf/ls-R resolves through "readlink"
to /var/lib/texmf/ls-R, which has size 0
(perhaps from an aborted "apt-get upgrade" when diskspace
might have been full, though all I remember are the repeated apt-get
failures with tetex-bin).
As a result, the following three lines in "mktexlsr",
elif test "x`sed 1q \"$db_file\"`" != "x$ls_R_magic" \
&& test "x`sed 1q \"$db_file\"`" != "x$old_ls_R_magic"; then
echo "$progname: $db_file lacks magic string. Skipping..." >&2
fail to find in /var/lib/texmf/ls-R a first line,
and certainly not a first line with either of,
% ls-R -- filename database for kpathsea; do not change this line.
% ls-R -- maintained by MakeTeXls-R; do not change this line.
This mktexlsr code probably wants to make sure no other program created
and might later alter /var/lib/texmf/ls-R.
HOWEVER, WHEN ls-R HAS SIZE 0,
I FEEL "mktexlsr" SHOULD PROCEED MAKING ls-R.
3. Solution.
a. An ordinary user can insert
the following first line into the 0-size ls-R file,
% ls-R -- filename database for kpathsea; do not change this line.
b. To permanently solve this at the software level,
I suggest altering the code of "mktexlsr" from the paragraph with
if test ! -f "$db_file"; then
cp /dev/null "$db_file"
# Use same permissions as parent directory, minus x,s, or t bits.
chmod `kpsestat -xst "$db_dir"` "$db_file"
elif test "x`sed 1q \"$db_file\"`" != "x$ls_R_magic" \
&& test "x`sed 1q \"$db_file\"`" != "x$old_ls_R_magic"; then
echo "$progname: $db_file lacks magic string. Skipping..." >&2
continue
fi
to the following paragraph with two extra lines at the first "elif",
if test ! -f "$db_file"; then
cp /dev/null "$db_file"
# Use same permissions as parent directory, minus x,s, or t bits.
chmod `kpsestat -xst "$db_dir"` "$db_file"
elif test ! -s "$db_file"; then
: #if $db_file has size 0, we will write to it below.
elif test "x`sed 1q \"$db_file\"`" != "x$ls_R_magic" \
&& test "x`sed 1q \"$db_file\"`" != "x$old_ls_R_magic"; then
echo "$progname: $db_file lacks magic string. Skipping..." >&2
continue
fi
4. Software installed.
Debian woody 3.0
kernel 2.4.20
iF tetex-bin 1.0.7+20011202-7.1 teTeX binary files
ii tetex-base 1.0.2+20011202-2 basic teTeX library files
ii tetex-doc 1.0.2+20011202-2 teTeX documentation
ii tetex-extra 1.0.2+20011202-2 extra teTeX library files
ii tetex-src 1.0.2+20011202-1 teTeX texmf source files
ii libc6 2.2.5-11.2 GNU C Library: Shared libraries
--
Jameson C. Burt, NJ9L Fairfax, Virginia, USA
jameson@coost.com http://www.coost.com
Attachment:
pgpb7sA_11Uc_.pgp
Description: PGP signature