NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
misc/57191: locate.updatedb fails to create the locate.database file
>Number: 57191
>Category: misc
>Synopsis: locate.updatedb fails to create the locate.database file
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: misc-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jan 20 04:45:00 +0000 2023
>Originator: Håkan Engvall
>Release: NetBSD-9.3_STABLE from Nov 11, 2022
>Organization:
>Environment:
NetBSD carolina.local 9.3_STABLE NetBSD 9.3_STABLE (CAROLINA) #1: Thu Jan 19 10:04:05 EST 2023 root@syn.local:/usr/src/sys/arch/i386/compile/CAROLINA i386
>Description:
The locate.updatedb script fails to generate the locate.database file when trying to execute locate.code with a bigram string beginning with a dash ('-').
>How-To-Repeat:
It will be hard to recreate a data set that will generate a bigram string beginning with a dash ('-') without providing the full file listing from my system. I don't really want to do that for privacy reasons. But the bigram string from my system was:
"- htmp.mp3jpJP.herine 2.tm1.ml3.ongi4.py.pe.5.re6..3enanstte7.8.s.he -10thn 9.ngt lear0.1 oresnd2 vet.atmes pd3 llder ta4 setir.ntalri5 itraouman.li6 y neTh.J7 PG.j8 etpgisrsroch Stod.9 d il01a io M Tun telophoeadfla/0ckrtomy.o geptockeurtrg lonaniodedss20"
>Fix:
Apply the following patch to locate.updatedb:
--- /usr/libexec/locate.updatedb.orig 2023-01-19 23:23:12.655056582 -0500
+++ /usr/libexec/locate.updatedb 2014-08-04 13:33:00.000000000 -0400
@@ -192,6 +192,6 @@
echo 'locate: updatedb failed' >&2
exit 1
else
- $LIBDIR/locate.code "$BIGRAMS" <"$FILELIST" >"$FCODES"
+ $LIBDIR/locate.code -- "$BIGRAMS" <"$FILELIST" >"$FCODES"
chmod 644 "$FCODES"
fi
This patch is against:
head -4 /usr/libexec/locate.updatedb
#!/bin/sh
#
# $NetBSD: updatedb.sh,v 1.15 2014/08/04 21:56:30 apb Exp $
#
But should work for the HEAD version (1.17) with adjustment for line numbers.
Home |
Main Index |
Thread Index |
Old Index