[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#203532: tetex-extra: permissions of ls-R wrong



On Wed, Aug 20, 2003 at 10:47:27PM +0900, Atsuhito Kohda wrote:
> I have a question.  With this patch, I tested mktexlsr
> and found that this patch fixed the cron's problem #198549
> but didn't fix #198546.
> 
> I suspect that the following modification is necessary.

Right idea, well spotted.  The correct fix, though, is the following:

> --- mktexlsr.orig       2003-08-19 12:30:22.000000000 +0900
> +++ mktexlsr    2003-08-19 14:51:28.000000000 +0900
> @@ -80,7 +80,7 @@
>    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"

that is, you move the test to within the 'if test -f "$db_file";'
block, which is the only time we require the directory to be
writeable.

   Julian

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

        Julian Gilbey, website: http://www.polya.uklinux.net/
   Debian GNU/Linux Developer, see: http://people.debian.org/~jdg/
     Visit http://www.thehungersite.com/ to help feed the hungry



Reply to: