On Thu, Jun 02, 2011 at 06:56:45PM +1000, Trent W. Buck wrote:
> Package: dlocate
> Version: 1.02
> Severity: minor
> 
> Looks like I can't search for strings that start with a leading
> hyphen.  Second error indicates you have code to deal with this, but
> apparently it needs more work.

will be fixed in next version.

in the meantime, this patch should do the trick.


--- dlocate     2009-06-03 19:10:20.000000000 +1000
+++ /tmp/dlocate        2011-06-03 08:01:17.753143796 +1000
@@ -277,14 +277,14 @@
     PREFIX="^([-a-zA-Z0-9_.+]+:|diversion by )"
     [ "$RE_TYPE" = "-G" ] && PREFIX="^([-a-zA-Z0-9_.+]+:\|diversion by )"
 
-    [ "$VERBOSE" = "1" ] && echo RUNNING: $GREP $RE_TYPE $IGNORE_CASE 
"$PREFIX.*$FILES_REGEXP" "$DLOCATEDB"
-    $GREP $RE_TYPE $IGNORE_CASE "$PREFIX.*$FILES_REGEXP" "$DLOCATEDB" | 
output_filter
+    [ "$VERBOSE" = "1" ] && echo RUNNING: $GREP $RE_TYPE $IGNORE_CASE -- 
"$PREFIX.*$FILES_REGEXP" "$DLOCATEDB"
+    $GREP $RE_TYPE $IGNORE_CASE -- "$PREFIX.*$FILES_REGEXP" "$DLOCATEDB" | 
output_filter
     result=$?
 
 elif [ "$OPTION" = 'DEFAULT' ] ; then
 
-    [ "$VERBOSE" = "1" ] && echo RUNNING: $GREP $RE_TYPE $IGNORE_CASE $WORD_RE 
"$PKGS_REGEXP" "$DLOCATEDB"
-    $GREP $RE_TYPE $IGNORE_CASE $WORD_RE "$PKGS_REGEXP" "$DLOCATEDB" | 
output_filter
+    [ "$VERBOSE" = "1" ] && echo RUNNING: $GREP $RE_TYPE $IGNORE_CASE $WORD_RE 
-- "$PKGS_REGEXP" "$DLOCATEDB"
+    $GREP $RE_TYPE $IGNORE_CASE $WORD_RE -- "$PKGS_REGEXP" "$DLOCATEDB" | 
output_filter
     result=$?
 
 elif [ "$OPTION" = '-s' ] ; then

craig

-- 
craig sanders <c...@taz.net.au>

BOFH excuse #312:

incompatible bit-registration operators



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to