]>
Commit | Line | Data |
---|---|---|
5e993f12 | 1 | Dont update makewhatis files if they're on readonly filesystems |
2 | ||
3 | http://bugs.gentoo.org/163932 | |
4 | ||
5 | --- src/makewhatis.sh | |
6 | +++ src/makewhatis.sh | |
7 | @@ -184,6 +188,34 @@ | |
8 | if [ x$verbose != x ]; then | |
9 | echo "about to enter $mandir" > /dev/stderr | |
10 | fi | |
11 | + | |
12 | + # kludge for Slackware's /usr/man/preformat | |
13 | + if [ $mandir = /usr/man/preformat ] | |
14 | + then | |
15 | + mandir1=/usr/man | |
16 | + else | |
17 | + mandir1=$mandir | |
18 | + fi | |
19 | + | |
20 | + # if $mandir is on a readonly partition, and the whatis file | |
21 | + # is not a symlink, then let's skip trying to update it | |
22 | + if [ ! -L ${mandir1}/whatis ] | |
23 | + then | |
24 | + if [ -e ${mandir1}/whatis ] && [ ! -w ${mandir1}/whatis ] | |
25 | + then | |
26 | + if [ x$verbose != x ]; then | |
27 | + echo skipping $mandir - whatis file is readonly > /dev/stderr | |
28 | + fi | |
29 | + continue | |
30 | + elif [ ! -e ${mandir1}/whatis ] && [ ! -w ${mandir1} ] | |
31 | + then | |
32 | + if [ x$verbose != x ]; then | |
33 | + echo skipping $mandir - directory is readonly > /dev/stderr | |
34 | + fi | |
35 | + continue | |
36 | + fi | |
37 | + fi | |
38 | + | |
39 | if [ -s ${mandir}/whatis -a $pages = man -a x$update = x ]; then | |
40 | if [ x$verbose != x ]; then | |
41 | echo skipping $mandir - we did it already > /dev/stderr | |
42 | @@ -407,14 +439,6 @@ | |
43 | ||
44 | cd $here | |
45 | ||
46 | - # kludge for Slackware's /usr/man/preformat | |
47 | - if [ $mandir = /usr/man/preformat ] | |
48 | - then | |
49 | - mandir1=/usr/man | |
50 | - else | |
51 | - mandir1=$mandir | |
52 | - fi | |
53 | - | |
54 | if [ -f ${mandir1}/whatis ] | |
55 | then | |
56 | cat ${mandir1}/whatis >> $TMPFILE |