Contents of /trunk/man/patches/man-1.6e-readonly-whatis2.patch
Parent Directory | Revision Log
Revision 324 -
(show annotations)
(download)
Mon Aug 20 16:04:40 2007 UTC (17 years, 1 month ago) by niro
File size: 1179 byte(s)
Mon Aug 20 16:04:40 2007 UTC (17 years, 1 month ago) by niro
File size: 1179 byte(s)
-missing cron file and added some fixes
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,25 @@ |
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 we cannot update the whatis |
21 | + # file, then let's simply skip it |
22 | + if ! touch ${mandir1}/whatis 2> /dev/null |
23 | + then |
24 | + if [ x$verbose != x ]; then |
25 | + echo skipping $mandir - whatis file is readonly > /dev/stderr |
26 | + fi |
27 | + continue |
28 | + fi |
29 | + |
30 | if [ -s ${mandir}/whatis -a $pages = man -a x$update = x ]; then |
31 | if [ x$verbose != x ]; then |
32 | echo skipping $mandir - we did it already > /dev/stderr |
33 | @@ -407,14 +430,6 @@ |
34 | |
35 | cd $here |
36 | |
37 | - # kludge for Slackware's /usr/man/preformat |
38 | - if [ $mandir = /usr/man/preformat ] |
39 | - then |
40 | - mandir1=/usr/man |
41 | - else |
42 | - mandir1=$mandir |
43 | - fi |
44 | - |
45 | if [ -f ${mandir1}/whatis ] |
46 | then |
47 | cat ${mandir1}/whatis >> $TMPFILE |