Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 254603 - sys-apps/slocate: support for nice, ionice
Summary: sys-apps/slocate: support for nice, ionice
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-12 04:34 UTC by haarp
Modified: 2009-01-12 20:53 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description haarp 2009-01-12 04:34:49 UTC
Currently, the configfile /etc/updatedb.conf contains various settings.

From the manpage:
"Secure Locate will parse GNU Locate’s /etc/updatedb.conf when the argument is provided. But please be aware that Secure Locate currently does NOT support all options provided by GNU Locate’s configuration file.

Options currently supported by Secure Locate are PRUNEFS and PRUNEPATHS"

So the settings NICE, IONICE_CLASS and IONICE_PRIORITY get ignored, since slocate doesn't know about them. This cause cron to stall the system daily, as slocate gets installed into /etc/cron.daily and clogs IO.

However, the fix is simple. Make the wrapper script in /etc/cron.daily pay attention to both nice and ionice. I basically added in the nice and ionice commands, whose values are taken from the config file.
Here's how the file looks on my system:

if [ -x /usr/bin/updatedb ]
then
        if [ -f /etc/updatedb.conf ]
        then
                source /etc/updatedb.conf
                ionice -c${IONICE_CLASS} -n${IONICE_PRIORITY} nice -n${NICE} /usr/bin/updatedb
        else
                nice /usr/bin/updatedb -f proc
        fi
fi
Comment 1 SpanKY gentoo-dev 2009-01-12 20:53:37 UTC
looks to me like slocate-3.1-r2 works fine