Package: dlocate
Version: 0.5-0.3
Severity: wishlist
Tags: patch

Hi,
I like -man option of dlocate, and I made a -bin option. It works similarly but
it display executables files in a package (ie: files in /bin, /sbin, /usr/bin
or /usr/sbin).


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (800, 'unstable'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-2-486
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages dlocate depends on:
ii  dctrl-tools [grep-dctrl]      2.11       Command-line tools to process Debi
ii  dpkg                          1.14.6     package maintenance system for Deb
ii  perl                          5.8.8-7    Larry Wall's Practical Extraction 

dlocate recommends no packages.

-- no debconf information
diff -Nur dlocate-0.5/debian/dlocate.1 dlocate-0.5-new/debian/dlocate.1
--- dlocate-0.5/debian/dlocate.1        2006-08-31 19:11:09.000000000 +0200
+++ dlocate-0.5-new/debian/dlocate.1    2007-09-06 21:57:06.000000000 +0200
@@ -77,6 +77,12 @@
 .B \-man
 list man pages (if any) of
 .IR package .
+.TP
+.B \-bin
+list executables (if any) of
+.IR package.
+Outputs a star (*) at beginning of line if executable is meant to be run by
+superuser.
 .PP
 
 .SH ENVIRONMENT VARIABLES
diff -Nur dlocate-0.5/dlocate dlocate-0.5-new/dlocate
--- dlocate-0.5/dlocate 2006-08-31 19:11:09.000000000 +0200
+++ dlocate-0.5-new/dlocate     2007-09-06 21:58:27.000000000 +0200
@@ -12,6 +12,7 @@
 # hacked by cas to add '-s' option (requires grep-dctrl).
 # hacked by cas to support multiple string/package arguments
 # hacked by cas to add simplistic emulation of 'dpkg -l'
+# hacked by arno. <[EMAIL PROTECTED]> to add '-bin' option.
 
 DLOCATEDB=/var/lib/dlocate/dlocatedb
 DPKGLIST=/var/lib/dlocate/dpkg-list
@@ -40,6 +41,7 @@
                echo "    -md5sum   package     list package's md5sums (if any)"
                echo "    -md5check package     check package's md5sums (if 
any)"
                echo "    -man      package     list package's man pages (if 
any)"
+               echo "    -bin      package     list package's executables (if 
any)"
                echo 
                echo "  The -L, -s, and -S commands are roughly analagous to 
the"
                echo "  equivalent dpkg commands."
@@ -141,6 +143,13 @@
                        echo Package \"$PKG\" not installed.
                fi
                ;;
+    "-bin")
+               if [ -e $DPKG_INFO/$PKG.list ] ; then 
+                       dlocate -L $PKG | sed -n -e 's/\(\/usr\)\?\/bin\//  
/p;s/\(\/usr\)\?\/sbin\/\(.*\)/* \2/p'
+        else
+                       echo Package \"$PKG\" not installed.
+        fi
+        ;;
        "-md5check")
                if [ -e $DPKG_INFO/$PKG.md5sums ] ; then 
                        cat $DPKG_INFO/$PKG.md5sums | \

Reply via email to