From fcf3a57ccb510a40a2346ee6f38c2fd6a566deae93d24a5d058ce1ae65062b6b Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Wed, 6 Nov 2019 08:51:24 +0000 Subject: [PATCH] boo#1155879 OBS-URL: https://build.opensuse.org/package/show/Base:System/man?expand=0&rev=106 --- cron.daily.do_mandb | 8 ++++---- man.changes | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/cron.daily.do_mandb b/cron.daily.do_mandb index 5422a5b..74fa679 100644 --- a/cron.daily.do_mandb +++ b/cron.daily.do_mandb @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # # do_mandb. This script was split off cron.daily. @@ -10,7 +10,7 @@ # # please send bugfixes or comments to feedback@suse.de. # -# Author: Werner Fink , 2008 +# Author: Werner Fink , 2008, 2019 # Burchard Steinbild , 1996 # Florian La Roche , 1996 # @@ -49,8 +49,8 @@ if test "$REINIT_MANDB" = yes ; then test -d "${cp}" || continue db=${cp}/index.db if test -e ${db} ; then - find $mp -follow -newer $db | read -t 1 line - test $? -eq 0 || continue + path="$(find $mp -follow -newer $db 2>/dev/null)" + test -n "$path" || continue fi nice -n 5 ionice -c 3 mandb -qs ${mp} > /dev/null 2>&1 || let errors++ done diff --git a/man.changes b/man.changes index 57ef926..34f9b8f 100644 --- a/man.changes +++ b/man.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Nov 6 08:48:22 UTC 2019 - Dr. Werner Fink + +- Avoid racy bash code on waiting on find in do_mandb (boo#1155879) + ------------------------------------------------------------------- Sun Nov 3 11:37:28 UTC 2019 - Dr. Werner Fink