Package: dlocate
Version: 1.02
Severity: normal

dlocate -- -mp3 fails because the -mp3 is passed on to grep

Solution is to add -- before the search term in the grep commands (see attached 
patch).

</nk>


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages dlocate depends on:
ii  dctrl-tools [grep-dctrl]      2.14       Command-line tools to process Debi
ii  dpkg                          1.15.7.2   Debian package management system
ii  perl                          5.10.1-13  Larry Wall's Practical Extraction 

dlocate recommends no packages.

dlocate suggests no packages.

-- no debconf information
--- /usr/bin/dlocate    2009-06-02 18:29:06.000000000 -0700
+++ ./dlocate   2010-06-25 13:57:14.000000000 -0700
@@ -278,13 +278,13 @@
     [ "$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
+    $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
+    $GREP $RE_TYPE $IGNORE_CASE $WORD_RE -- "$PKGS_REGEXP" "$DLOCATEDB" | 
output_filter
     result=$?
 
 elif [ "$OPTION" = '-s' ] ; then

Reply via email to