[Bug 591050] New: locate (findutils-locate) doesn't accept wildcards as is described in manual
http://bugzilla.novell.com/show_bug.cgi?id=591050 http://bugzilla.novell.com/show_bug.cgi?id=591050#c0 Summary: locate (findutils-locate) doesn't accept wildcards as is described in manual Classification: openSUSE Product: openSUSE 11.2 Version: Final Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: nettezzaumanaa@gmail.com QAContact: qa@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.17) Gecko/2009122200 SUSE/3.0.17-0.1 Firefox/3.0.17 hi suse developers .. # rpm -qf `which locate` findutils-locate-4.4.0-46.2.i586 # cat /bin/dd >/var/tmp/DSEE.7.0.Linux-X86-zip.tar.gz # cat /bin/dd >/var/tmp/DSEE.7.0.Solaris-Sparc-zip.tar.gz # updatedb --localpaths=/var/tmp/ # locate -i dsee /var/tmp/DSEE.7.0.Linux-X86-zip.tar.gz /var/tmp/DSEE.7.0.Solaris-Sparc-zip.tar.gz # if ! (locate -i 'dsee*solaris*' || locate -i 'dsee.*solaris.*'); then echo what the hell\?; fi what the hell? ^^ it seems like broken pattern parsing engine, locate(1) manpage says this: DESCRIPTION This manual page documents the GNU version of locate. For each given pattern, locate searches one or more databases of file names and displays the file names that contain the pattern. Patterns can contain shell-style metacharacters: `*', `?', and `[]'. The metacharacters do not treat `/' or `.' specially. Therefore, a pattern `foo*bar' can match a file name that contains `foo3/bar', and a pattern `*duck*' can match a file name that contains `lake/.ducky'. Patterns that contain metacharacters should be quoted to protect them from expansion by the shell. . however this works: # locate -i '*dsee*solaris*' /var/tmp/DSEE.7.0.Solaris-Sparc-zip.tar.gz but i still consider it as broken because it's pretty annoying to do things this way and it's not working as is described in docs (Therefore, a pattern `foo*bar' can match a file name that contains `foo3/bar', and a pattern `*duck*' can match a file name that contains `lake/.ducky) .. regards and have a nice day, daniel Reproducible: Always -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=591050 http://bugzilla.novell.com/show_bug.cgi?id=591050#c1 Tomas Cech <tcech@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tcech@novell.com --- Comment #1 from Tomas Cech <tcech@novell.com> 2010-03-25 14:18:38 UTC ---
From man page:
If a pattern is a plain string — it contains no metacharacters — locate displays all file names in the database that contain that string anywhere. If a pattern does contain metacharacters, locate only displays file names that match the pattern exactly. As a result, patterns that contain metacharacters should usually begin with a `*', and will most often end with one as well. The exceptions are patterns that are intended to explicitly match the beginning or end of a file name. With pattern begining with '*' it starts working. I'd suggest to close as invalid. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=591050 http://bugzilla.novell.com/show_bug.cgi?id=591050#c yang xiaoyu <xyyang@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |xyyang@novell.com AssignedTo|bnc-team-screening@forge.pr |pth@novell.com |ovo.novell.com | -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=591050 http://bugzilla.novell.com/show_bug.cgi?id=591050#c2 Philipp Thomas <pth@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P4 - Low Status|NEW |RESOLVED Resolution| |INVALID --- Comment #2 from Philipp Thomas <pth@novell.com> 2010-03-26 10:28:33 CET --- Tomas, I follow your argument. @Daniel, if you still think this is a bug please file this with the upstream findutils maintainers at http://savannah.gnu.org/bugs/?group=findutils -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=591050 http://bugzilla.novell.com/show_bug.cgi?id=591050#c3 --- Comment #3 from Daniel Pecka <nettezzaumanaa@gmail.com> 2010-03-26 09:41:22 UTC --- Hello Philipp .. thanks for sugestion .. i still consider that at least there are some discrepancies in the documentation in comparison to the real operation of the programme. "should != must" and also this sentence "The exceptions are patterns that are intended to explicitly match the beginning or end of a file name." gives me no sense when compared against real locate behaviour .. i also believe, that default pattern parsing should work another way. thanks and regards, daniel -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com