From owner-cvs-src-old@FreeBSD.ORG Mon Dec 27 23:47:07 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9CE61065782 for ; Mon, 27 Dec 2010 23:47:07 +0000 (UTC) (envelope-from wollman@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id AD2F88FC12 for ; Mon, 27 Dec 2010 23:47:07 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id oBRNl7HC084721 for ; Mon, 27 Dec 2010 23:47:07 GMT (envelope-from wollman@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id oBRNl7q5084720 for cvs-src-old@freebsd.org; Mon, 27 Dec 2010 23:47:07 GMT (envelope-from wollman@repoman.freebsd.org) Message-Id: <201012272347.oBRNl7q5084720@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to wollman@repoman.freebsd.org using -f From: Garrett Wollman Date: Mon, 27 Dec 2010 23:46:47 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: RELENG_8 Subject: cvs commit: src/usr.bin/locate/locate locate.rc updatedb.sh X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Dec 2010 23:47:07 -0000 wollman 2010-12-27 23:46:47 UTC FreeBSD src repository Modified files: (Branch: RELENG_8) usr.bin/locate/locate locate.rc updatedb.sh Log: SVN rev 216745 on 2010-12-27 23:46:47Z by wollman Merge three revisions from head: r214583 | wollman | 2010-10-30 22:36:05 -0400 (Sat, 30 Oct 2010) | 6 lines Changed paths: M /head/usr.bin/locate/locate/locate.rc M /head/usr.bin/locate/locate/updatedb.sh Make it possible to exclude directories by name no matter where they are in the filesystem from the locate database. By default, exclude ".zfs" directories, as users who who have set snapdir=visible and are taking frequent snapshots most likely do not want the snapshots included in the locate database. ------------------------------------------------------------------------ r214613 | wollman | 2010-10-31 21:51:47 -0400 (Sun, 31 Oct 2010) | 7 lines Changed paths: M /head/usr.bin/locate/locate/updatedb.sh jilles@ pointed out that using ${PRUNEDIRS:=".zfs"} in updatedb.sh made it impossible to override PRUNEDIRS to make it empty. Use the non-colon form to only set PRUNEDIRS if it is completely unset. (For parallelism, the other configuration defaults here could be done the same way, but that could be more obviously accomplished by disabling updatedb in periodic.conf, so leave them alone for now.) ------------------------------------------------------------------------ r214615 | wollman | 2010-10-31 22:20:18 -0400 (Sun, 31 Oct 2010) | 6 lines Changed paths: M /head/usr.bin/locate/locate/updatedb.sh Style cleanup: make this look more like a 21st-century shell script and not something out of the early 1980s. Make sure all error messages go to stderr, not stdout. Since there's error-handling code to handle empty SEARCHPATHS and FILESYSTEMS, use the initialization form that allows this error to be diagnosed. (hat tip: jilles@) Revision Changes Path 1.11.2.2 +4 -1 src/usr.bin/locate/locate/locate.rc 1.22.2.2 +26 -19 src/usr.bin/locate/locate/updatedb.sh