/[pkgs]/devel/texlive/texlive-mktexlsr_fixes.patch
ViewVC logotype

Contents of /devel/texlive/texlive-mktexlsr_fixes.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download) (as text)
Mon Jan 7 09:34:59 2008 UTC (22 months, 2 weeks ago) by jnovy
Branch: MAIN
CVS Tags: texlive-2007-46_fc13, texlive-2007-32_fc10, texlive-2007-44_fc12, texlive-2007-26_fc9, texlive-2007-39_fc11, texlive-2007-11_fc9, texlive-2007-10_fc9, texlive-2007-22_fc9, texlive-2007-33_fc10, texlive-2007-40_fc11, F-12-split, texlive-2007-41_fc10, texlive-2007-41_fc11, texlive-2007-36_fc11, texlive-2007-42_fc11, F-10-split, F-11-split, texlive-2007-23_fc9, texlive-2007-20_fc9, texlive-2007-21_fc9, texlive-2007-8_fc9, F-9-split, texlive-2007-27_fc9, texlive-2007-30_fc10, texlive-2007-31_fc10, texlive-2007-47_fc13, texlive-2007-13_fc9, texlive-2007-19_fc9, texlive-2007-18_fc9, texlive-2007-28_fc9, texlive-2007-24_fc9, texlive-2007-25_fc9, texlive-2007-35_fc10, texlive-2007-17_fc9, texlive-2007-34_fc10, texlive-2007-9_fc9, texlive-2007-37_fc11, texlive-2007-43_fc12, texlive-2007-38_fc11, texlive-2007-12_fc9, texlive-2007-16_fc9, texlive-2007-15_fc9, texlive-2007-14_fc9, texlive-2007-29_fc10, texlive-2007-45_fc13, HEAD
Changes since 1.1: +32 -44 lines
File MIME type: text/x-patch
- add tex-latex and tex-dvips virtual provides
- mktexlsr fixes from Patrice Dumas
1 diff -up texlive-2007/texk/kpathsea/mktexlsr.man.mktexlsr_fixes texlive-2007/texk/kpathsea/mktexlsr.man
2 --- texlive-2007/texk/kpathsea/mktexlsr.man.mktexlsr_fixes 2006-01-17 22:41:51.000000000 +0100
3 +++ texlive-2007/texk/kpathsea/mktexlsr.man 2008-01-06 16:13:33.000000000 +0100
4 @@ -44,3 +44,12 @@ Print help message and exit.
5 .B --version
6 .rb
7 Print version information and exit.
8 +.\"=====================================================================
9 +.SH NOTES
10 +When called by root with no arguments, \fBmktexlsr\fP in Debian ignores
11 +TEXMF trees under \fI$HOME\fP. This is to avoid creating undesirable files
12 +such as \fI/root/texmf/ls-R\fP when doing usual maintainance (it is generally
13 +a bad idea to work with TeX as root, therefore having a file such as
14 +\fI/root/texmf/ls-R\fP in the first place is rather pointless). If you really
15 +want to update the ls-R databases for such TEXMF trees, simply list them
16 +explicitely on the command-line.
17 diff -up texlive-2007/texk/kpathsea/mktexlsr.mktexlsr_fixes texlive-2007/texk/kpathsea/mktexlsr
18 --- texlive-2007/texk/kpathsea/mktexlsr.mktexlsr_fixes 2006-12-25 19:44:43.000000000 +0100
19 +++ texlive-2007/texk/kpathsea/mktexlsr 2008-01-06 16:37:22.000000000 +0100
20 @@ -82,10 +82,21 @@ test $# = 0 && {
21 '
22 set x `kpsewhich --show-path=ls-R | tr : '
23 ' | sort | uniq`; shift
24 + if test "`id -u`" -eq 0; then
25 + NOROOTHOME=true
26 + fi
27 IFS=$OIFS
28 }
29
30 for TEXMFLS_R in "$@"; do
31 + if [ "z$HOME" != 'z' ]; then
32 + case "$TEXMFLS_R" in
33 + $HOME/*) if test -n "$NOROOTHOME"; then
34 + tty -s && echo "$progname: Skipping $TEXMFLS_R" >&2
35 + continue
36 + fi ;;
37 + esac
38 + fi
39 # Prepend cwd if the directory was relative.
40 case "$TEXMFLS_R" in
41 "") continue ;; # Strictly speaking, it is an error if this case is taken.
42 @@ -112,9 +123,9 @@ for TEXMFLS_R in "$@"; do
43 db_dir=`echo "$db_file" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname
44
45 test -d "$db_dir" || continue
46 - test -w "$db_dir" || { echo "$progname: $db_dir: directory not writable. Skipping..." >&2; continue; }
47
48 if test ! -f "$db_file"; then
49 + test -w "$db_dir" || { echo "$progname: $db_dir: directory not writable. Skipping..." >&2; continue; }
50 cp /dev/null "$db_file"
51 # Use same permissions as parent directory, minus x,s, or t bits.
52 chmod `kpsestat -xst "$db_dir"` "$db_file"
53 @@ -128,11 +139,8 @@ for TEXMFLS_R in "$@"; do
54 # Skip if we cannot write the file:
55 kpseaccess -w "$db_file" || { echo "$progname: $db_file: no write permission. Skipping..." >&2; continue; }
56
57 - db_dir_tmp="$db_dir/lsR$$.tmp"
58 - (umask 077 && mkdir "$db_dir_tmp" ) \
59 - || { echo "$progname: could not create directory '$db_dir_tmp'. Skipping..." >&2; continue; }
60 - db_file_tmp="$db_dir_tmp/lsR$$.tmp"
61 - rm -f "$db_file_tmp"
62 + db_file_tmp=`mktemp -t ls-R.XXXXXXXXXX` \
63 + || { echo "$progname: could not create temporary file for '$db_file'. Skipping..." >&2; continue; }
64
65 $verbose && echo "$progname: Updating $db_file... " >&2
66 echo "$ls_R_magic" >"$db_file_tmp"
67 @@ -152,12 +160,8 @@ for TEXMFLS_R in "$@"; do
68 | sed -e '/\.svn.*:$/,/^$/d' \
69 >>"$db_file_tmp"
70
71 - # To be really safe, a loop.
72 - until PERMS=`kpsestat = "$db_file"`; do sleep 1; done
73 - chmod $PERMS "$db_file_tmp"
74 - rm -f "$db_file"
75 - mv "$db_file_tmp" "$db_file"
76 - rm -rf "$db_dir_tmp"
77 + cat "$db_file_tmp" > "$db_file"
78 + rm -f "$db_file_tmp"
79 done
80 $verbose && echo "$progname: Done." >&2
81 exit 0

admin@fedoraproject.org
ViewVC Help
Powered by ViewVC 1.1.2