Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Bug in updatedb ???

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
02ebz06
Posts: 24
Joined: 2017-12-23 21:22

Bug in updatedb ???

#1 Post by 02ebz06 »

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.

02ebz06
Posts: 24
Joined: 2017-12-23 21:22

Re: Bug in updatedb ???

#2 Post by 02ebz06 »

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...

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Bug in updatedb ???

#3 Post by bw123 »

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?
resigned by AI ChatGPT

02ebz06
Posts: 24
Joined: 2017-12-23 21:22

Re: Bug in updatedb ???

#4 Post by 02ebz06 »

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...

Post Reply