Bug#221518: tetex-bin: Fails to install after upgrade
severity 221518 normal
tag 221518 moreinfo
thanks
From: Hilmar Preusse <hille42@web.de>
Subject: Bug#221518: tetex-bin: Fails to install after upgrade
Date: Wed, 19 Nov 2003 19:26:36 +0100
> > Should we provide the default ls-R with tetex-base? (It looked we
> > didn't do so at present.)
> >
> If it is really, what I suspect I'd so no. These file can be
> generated so we don't have them to deliver with our packages.
Yes, I suspected to deliver the default ls-R might fix
the problem if this was the fresh install, but this was
not the case so it is trivially irrelevent.
And this was an upgrading problem then I've no idea or
rather there are too many possibilities, I guess.
disk might be full at some instance?
some particular debconf settings on lsr-perms etc. and
some action?
ohter packages (possibly wrong) action on ls-R?
And is there any overlooked problem in the recent patch
to mktexlsr?
--- tetex-bin-2.0.orig/texk/kpathsea/mktexlsr.orig 2002-10-23 03:34:07.000000000 +0900
+++ tetex-bin-2.0/texk/kpathsea/mktexlsr 2003-08-18 21:11:45.000000000 +0900
@@ -80,9 +80,9 @@
db_dir=`echo "$db_file" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname
test -d "$db_dir" || continue
- test -w "$db_dir" || { echo "$progname: $db_dir: directory not writable. Skipping..." >&2; continue; }
if test ! -f "$db_file"; then
+ test -w "$db_dir" || { echo "$progname: $db_dir: directory not writable. Skipping..." >&2; continue; }
cp /dev/null "$db_file"
# Use same permissions as parent directory, minus x,s, or t bits.
chmod `kpsestat -xst "$db_dir"` "$db_file"
@@ -95,11 +95,8 @@
# Skip if we cannot write the file:
access -w "$db_file" || { echo "$progname: $db_file: no write permission. Skipping..." >&2; continue; }
- db_dir_tmp="$db_dir/lsR$$.tmp"
- (umask 077 && mkdir "$db_dir_tmp" ) \
- || { echo "$progname: could not create directory '$db_dir_tmp'. Skipping..." >&2; continue; }
- db_file_tmp="$db_dir_tmp/lsR$$.tmp"
- rm -f "$db_file_tmp"
+ db_file_tmp=`tempfile -p ls-R` \
+ || { echo "$progname: could not create temporary file for '$db_file'. Skipping..." >&2; continue; }
tty -s && echo "$progname: Updating $db_file... "
echo "$ls_R_magic" >"$db_file_tmp"
@@ -113,12 +110,8 @@
(cd "$TEXMFLS_R" && \ls -LRa 2>/dev/null) |
sed 's%^[^.].*:$%./&%; /^\.$/d; /^\.\.$/d; /^lsR[0-9]*\.tmp$/d' >>"$db_file_tmp"
- # To be really safe, a loop.
- until PERMS=`kpsestat = "$db_file"`; do sleep 1; done
- chmod $PERMS "$db_file_tmp"
- rm -f "$db_file"
- mv "$db_file_tmp" "$db_file"
- rm -rf "$db_dir_tmp"
+ cat "$db_file_tmp" > "$db_file"
+ rm -f "$db_file_tmp"
done
tty -s && echo "$progname: Done."
exit 0
2003-11-20(Thu)
--
Debian Developer & Debian JP Developer - much more I18N of Debian
Atsuhito Kohda <kohda@debian.org>
Department of Math., Univ. of Tokushima
Reply to: