Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 65560 - [Patch] slocate ignores $LOCATE_PATH and multiple databases via "-d"
Summary: [Patch] slocate ignores $LOCATE_PATH and multiple databases via "-d"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-27 10:51 UTC by Johannes Günther
Modified: 2004-10-14 16:45 UTC (History)
0 users

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


Attachments
Appends new database path rather than overwrite (slocate-2.7-append-locate_path.patch,1.61 KB, patch)
2004-09-27 10:53 UTC, Johannes Günther
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Günther 2004-09-27 10:51:30 UTC
The bug in slocate 2.7 renders the support for $LOCATE_PATH useless: Each new path/Database specification, either explicit from commandline with "-d" or implicit with the default path, overwrote the potential previous specified paths/databases (by $LOCATE_PATH or -d).

I fixed this by appending new paths to the existing ones (see attached patch).

Besides that I also fixed a buffer overflow (4 bytes) as there was not enough memory allocated for pointers in SLOCATE_PATH to also hold the terminating NULL.

I also mailed the author of slocate (Kevin Lindsay) a month ago but did not get a reply. 

Reproducible: Always
Steps to Reproduce:




# emerge info
Portage 2.0.50-r9 (default-x86-1.4, gcc-3.3.1, glibc-2.3.4.20040808-r0, 2.6.3-
gentoo-r1)
=================================================================
System uname: 2.6.3-gentoo-r1 i686 AMD Athlon(tm) Processor
Gentoo Base System version 1.4.3.10p1
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -mcpu=athlon -march=athlon -fforce-addr -fomit-frame-pointer -funroll-
loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -pipe -ffast-math 
-mmmx -m3dnow"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/
share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/tex/generic/
config/ /usr/share/texmf/tex/platex/config/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/afs/C /etc/afs/afsws /etc/gconf /etc/env.d"
CXXFLAGS="-O3 -mcpu=athlon -march=athlon -fforce-addr -fomit-frame-pointer -funroll-
loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -pipe -ffast-math 
-mmmx -m3dnow"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox userpriv usersandbox"
GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://ftp.
tu-clausthal.de/pub/linux/gentoo/ ftp://sunsite.dk/mirrors/gentoo/ http://gentoo.
oregonstate.edu/ http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow X aalib afs alsa apache2 apm avi berkdb bitmap-fonts bonobo cdr crypt 
cups dga dvd encode fbcon foomaticdb gb gd gdbm gif gnome gpm gtk gtk2 guile idea 
imap imlib jikes jpeg kerberos lcms ldap libwww lirc mad matrox mbox mikmod mmx 
motif mpeg mysql ncurses nls oggvorbis opengl pam pdflib pic plotutils png python qt 
quicktime readline samba sdl spell sse ssl tcltk tcpd tetex tiff truetype usb wmf 
x86 xml2 xmms xprint xv zlib"
Comment 1 Johannes Günther 2004-09-27 10:53:25 UTC
Created attachment 40547 [details, diff]
Appends new database path rather than overwrite
Comment 2 SpanKY gentoo-dev 2004-09-27 19:40:43 UTC
you send this upstream ?
Comment 3 Johannes Günther 2004-09-28 00:19:10 UTC
Sorry, what do you mean?

I also imformed the author of slocate before I reported this bug here. But since he did not answer so far I found it a good idea that this bug gets at least fixed by gentoo.
Comment 4 SpanKY gentoo-dev 2004-10-14 16:45:33 UTC
duh, you even told me you talked to upstream in your original report

sorry about that ;)

fixed in 2.7-r6