Bug in updatedb ???

If none of the more specific forums is the right place to ask

Bug in updatedb ???

Postby 02ebz06 » 2018-02-03 20:00

Not sure if this is a bug, or I don't have something installed/configured right, but...

This is on Stretch.

What I am is experiencing is updatedb does not look at /etc/updatedb.conf.
I've added two mount points as exclusions to the PRUNEPATHS variable and nothing changes, they still get searched.
So, I tracked down updatedb.
Quite a discovery doing this.
I found updatedb in /usr/bin/ as a link to /etc/alternatives/updated, which was a link back to /usr/bin/updatedb.findutils.
I did a grep on it for updatedb.conf, but was not in the file.
So I can either edit the /usr/bin/updatedb.findutils and add my two mount points to it's internal PRUNEPATHS list or,
just add --> export PRUNEPATHS="/MountPoint1 /MountPoint2" to my .profile file.
I can do either one and that works.
The environment variable is obviously best way.

So my question is, is it a bug that updatedb doesn't look at the /etc/updatedb.conf file, or is it left over from an older version?
man pages don't mention it.
Posts: 13
Joined: 2017-12-23 21:22

Re: Bug in updatedb ???

Postby 02ebz06 » 2018-02-07 19:30

I guess this is a bug.
Creating the PRUNEPATHS variable in your .profile file with a list of paths to exclude only works when you run updatedb at the command line.
When cron runs updatedb, updatedb does not see the PRUNEPATHS variable you set in root's .profile.

Surely somebody must run into this...
Posts: 13
Joined: 2017-12-23 21:22

Re: Bug in updatedb ???

Postby bw123 » 2018-02-07 19:58

There is a lot of confusion over the fact that cron does not login. I don't use locate or mlocate, i think there could be more than one updatedb?

If the man page for the updatebd you are using does not mention updatedb.conf then it would not be a bug if it ignored it?
User avatar
Posts: 3677
Joined: 2011-05-09 06:02
Location: TN_USA

Re: Bug in updatedb ???

Postby 02ebz06 » 2018-02-07 21:07

right, but why have the updatedb.conf file then?
You have no way to exclude paths without modifying the source which will change on next upgrade.
Seems like an oversight one way or the other.
Either by putting the updatedb.conf there, or by ubdatedb not looking at it...
Posts: 13
Joined: 2017-12-23 21:22

Return to General Questions

Who is online

Users browsing this forum: No registered users and 16 guests