Package: release.debian.org
Severity: normal
Tags: patch
User: release.debian....@packages.debian.org
Usertags: unblock

Please unblock package dlocate

dlocate has been neglected for quite some time now. I have collected
some patches to fix several minor but annoying bugs in the bugtracker
and fixed the manpages. I understand that these changes are not relevant
for security-related issues and I naturally accept if my unblock request
gets rejected. However, I think all these changes are nice to have and
bring the package into a much better shape for shipping with Wheezy.

I am attaching the debdiff between the version in testing and unstable.

Cheers,

Adrian

unblock dlocate/1.02+nmu3

-- System Information:
Debian Release: 7.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.7-trunk-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru dlocate-1.02/debian/changelog dlocate-1.02+nmu3/debian/changelog
--- dlocate-1.02/debian/changelog	2009-06-03 03:24:04.000000000 +0200
+++ dlocate-1.02+nmu3/debian/changelog	2012-12-29 14:34:22.000000000 +0100
@@ -1,3 +1,28 @@
+dlocate (1.02+nmu3) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix handling of multiple arguments for several commands (Closes: #563881).
+  * Fix dlocate return codes for several commands on exit (Closes: #564293).
+
+ -- John Paul Adrian Glaubitz <glaub...@physik.fu-berlin.de>  Sat, 29 Dec 2012 14:32:54 +0100
+
+dlocate (1.02+nmu2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Add missing "--" when invoking grep command (Closes: #587179).
+  * Fix bash completion for package names in dlocate (Closes: # 658669).
+  * Fix incorrect exit code 0 on failed search (Closes: #689647).
+  * Fix parameter passing to dlocate_option_error() in dlocate (Closes: # 690758).
+
+ -- John Paul Adrian Glaubitz <glaub...@physik.fu-berlin.de>  Fri, 28 Dec 2012 15:42:16 +0100
+
+dlocate (1.02+nmu1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix several mistakes in manpages (Closes: #586483, #692896, #696479).
+
+ -- John Paul Adrian Glaubitz <glaub...@physik.fu-berlin.de>  Fri, 21 Dec 2012 11:47:08 +0100
+
 dlocate (1.02) unstable; urgency=low
 
   * fixed example in dlocate.1 man page again (Closes: #466662)
diff -Nru dlocate-1.02/dlocate dlocate-1.02+nmu3/dlocate
--- dlocate-1.02/dlocate	2009-06-03 03:28:53.000000000 +0200
+++ dlocate-1.02+nmu3/dlocate	2012-12-29 14:30:19.000000000 +0100
@@ -199,7 +199,7 @@
             ;;
 
         (-*)
-                dlocate_option_error $1
+                dlocate_option_error $p
             ;;
 
         (*)
@@ -217,7 +217,7 @@
 FILES_REGEXP="($PKGS_REGEXP)"
 [ "$WORD_RE" = "-w" ] && FILES_REGEXP="\b$FILES_REGEXP\b"
 
-PKGS=$(echo "$PKGS" | sed -e "s/$SEPARATOR/ /")
+PKGS=$(echo "$PKGS" | sed -e "s/$SEPARATOR/ /g")
 
 if [ "$VERBOSE" = "1" ] ; then
     echo "PKGS:" $PKGS
@@ -277,15 +277,15 @@
     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
-    result=$?
+    [ "$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=${PIPESTATUS[0]}
 
 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
-    result=$?
+    [ "$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=${PIPESTATUS[0]}
 
 elif [ "$OPTION" = '-s' ] ; then
     DCTRL_REGEXP="^($PKGS_REGEXP)$"
@@ -316,48 +316,60 @@
             '-L')
                 if [ -s $DPKG_INFO/$PKG.list ] ; then
                     cat $DPKG_INFO/$PKG.list
+                    result=$?
                 else
                     echo Package $PKG not installed or $PKG.list is empty. >&2
+                    result=1
                 fi
                 ;;
 
             '-ls')
                 if [ -s $DPKG_INFO/$PKG.list ] ; then
                     xargs -r ls -ldF < $DPKG_INFO/$PKG.list
+                    result=$?
                 else
                     echo Package $PKG not installed or $PKG.list is empty. >&2
+                    result=1
                 fi
                 ;;
 
             '-du')
                 if [ -s $DPKG_INFO/$PKG.list ] ; then
                     du -sck $(cat $DPKG_INFO/$PKG.list | xargs -r ls -1dF | grep -v "@$\|/$" )
+                    result=$?
                 else
                     echo Package $PKG not installed or $PKG.list is empty. >&2
+                    result=1
                 fi
                 ;;
 
             '-conf')
                 if [ -s $DPKG_INFO/$PKG.conffiles ] ; then
                     cat $DPKG_INFO/$PKG.conffiles
+                    result=$?
                 else
                     echo Package $PKG not installed or has no conffiles. >&2
+                    result=1
                 fi
                 ;;
 
             '-lsconf')
                 if [ -s $DPKG_INFO/$PKG.conffiles ] ; then
                     ls -ldF $(cat $DPKG_INFO/$PKG.conffiles)
+                    result=$?
                 else
                     echo Package $PKG not installed or has no conffiles. >&2
+                    result=1
                 fi
                 ;;
 
             '-md5sum')
                 if [ -s $DPKG_INFO/$PKG.md5sums ] ; then
                     cat $DPKG_INFO/$PKG.md5sums
+                    result=$?
                 else
                     echo Package $PKG not installed or has no md5sums. >&2
+                    result=1
                 fi
                 ;;
 
@@ -365,8 +377,10 @@
                 if [ -s $DPKG_INFO/$PKG.list ] ; then
                     dlocate -L $PKG | \
                     grep -E '/man[0-9]+/'
+                    result=$?
                 else
                     echo Package $PKG not installed or $PKG.list is empty. >&2
+                    result=1
                 fi
                 ;;
 
@@ -378,8 +392,10 @@
                             -e 's:.*/::' \
                             -e 's/\(^.*\)\.\(.*\)/\2 \1/' | \
                         sort -u
+                    result=$?
                 else
                     echo Package $PKG not installed or $PKG.list is empty. >&2
+                    result=1
                 fi
                 ;;
 
@@ -391,8 +407,10 @@
                     grep -E '^-.{2,8}[xs]' | \
                     sed -e 's/.* \//\//' | \
                     xargs -r ls -1
+                    result=$?
                 else
                     echo Package $PKG not installed or $PKG.list is empty. >&2
+                    result=1
                 fi
                 ;;
 
@@ -402,8 +420,10 @@
                     cat $DPKG_INFO/$PKG.md5sums | \
                         md5sum -c -
                     popd >/dev/null 2>&1
+                    result=$?
                 else
                     echo Package $PKG not installed or has no md5sums. >&2
+                    result=1
                 fi
                 ;;
 
diff -Nru dlocate-1.02/dlocate.1 dlocate-1.02+nmu3/dlocate.1
--- dlocate-1.02/dlocate.1	2009-06-03 03:11:48.000000000 +0200
+++ dlocate-1.02+nmu3/dlocate.1	2012-12-29 14:23:15.000000000 +0100
@@ -19,7 +19,7 @@
 .SH "DESCRIPTION"
 .PP
 .B dlocate
-is a fast alternative to dpkg for queries like `dpkg -L' and `dpkg -S'
+is a fast alternative to dpkg for queries like `dpkg \-L' and `dpkg \-S'
 
 .SH COMMANDS
 .TP
@@ -28,19 +28,19 @@
 .IR PATTERN .
 
 Note that dlocate uses GNU grep, so normal regexp metacharacters need to be taken into account or avoided
-by using the '-F' (Fixed String) grep option.
+by using the '\-F' (Fixed String) grep option.
 
 For example, to search for `/usr/bin/[', you might try:
 \fBdlocate '/usr/bin/\\['\fP
 or
-\fBdlocate -F '/usr/bin/['\fP
+\fBdlocate \-F '/usr/bin/['\fP
 .TP
 .BR \-S
-list all records where only the filename matches
+List all records where only the filename matches
 .IR PATTERN .
 
 Note that dlocate uses GNU grep, so normal regexp metacharacters need to be taken into account.
-Fixed String searches are incompatible with -S
+Fixed String searches are incompatible with \-S.
 
 For example, to search for `/usr/bin/[', you need to type:
 
@@ -52,7 +52,7 @@
 .IR package .
 
 Internally this uses grep on a file containing the reformatted
-output output of 'dpkg \-l' (four fields separated by tabs; status,
+output of 'dpkg \-l' (four fields separated by tabs; status,
 package-name, installed version, short description) so it will return
 packages whose version or short description matches, too.
 
@@ -66,14 +66,12 @@
 
 Both of these will list all the packages whose names start with `libc6'.
 
-
-
 Note that because of the difference between regular expressions and
-dpkg's shell\-style pattern matching, the output from \fBdlocate -l\fP
-is occasionally different to the output from \fBdpkg -l\fP.
+dpkg's shell\-style pattern matching, the output from \fBdlocate \-l\fP
+is occasionally different to the output from \fBdpkg \-l\fP.
 
 This is not a bug, regular expressions are far more flexible than shell
-pattern matching.  This is the way dlocate is supposed to run, but it
+pattern matching. This is the way dlocate is supposed to run, but it
 may require some knowledge of regular expressions to get the output you
 want.
 
@@ -153,10 +151,9 @@
 Select only those lines containing matches that form whole words.
 The test is that the matching substring must either be at the
 beginning of the line, or preceded by a non-word constituent
-character.
-Similarly, it must be either at the end of the line
-or followed by a non-word constituent character.
-Word-constituent characters are letters, digits, and the underscore.
+character. Similarly, it must be either at the end of the line
+or followed by a non-word constituent character. Word-constituent
+characters are letters, digits, and the underscore.
 
 .TP
 .BR \-i ", " --ignore-case
@@ -205,12 +202,12 @@
 .SH FILES
 .TP
 .I /etc/default/dlocate
-Configuration file with default options.  Currently the only option is
+Configuration file with default options. Currently the only option is
 to enable/disable gzip compression of /var/lib/dlocate/dlocatedb.
 
 .TP
 .I /var/lib/dlocate/dlocatedb
-plain text listing of all files belonging to all packages (optionally compressed)
+Plain text listing of all files belonging to all packages (optionally compressed)
 
 .TP
 .I /var/lib/dlocate/dpkg-list
@@ -228,27 +225,27 @@
 
 To view all man pages contained within the dpkg package:
 .br
-\fB     man $(dlocate -man dpkg)\fP
+\fB     man $(dlocate \-man dpkg)\fP
 .br
 
 To purge kernel version 2.6.28.7 and all related module packages:
 .br
-\fB     dlocate -k | grep -- -2.6.28.7 | xargs apt-get purge\fP
+\fB     dlocate \-k | grep \-\- \-2.6.28.7 | xargs apt\-get purge\fP
 .br
 
 To check the md5sums of the dlocate package:
 .br
-\fB     dlocate -md5check dlocate\fP
+\fB     dlocate \-md5check dlocate\fP
 .br
 
 To use dpkg-repack to make a backup copy of all installed mythtv packages just before
 upgrading them:
 .br
-\fB     dlocate -l mythtv | grep '^.i' | awk '{print $2}' | xargs dpkg-repack\fP
+\fB     dlocate \-l mythtv | grep '^.i' | awk '{print $2}' | xargs dpkg\-repack\fP
 .br
 
 .br
-# dlocate -l mythtv | grep '^.i' | awk '{print $2}' | xargs dpkg-repack
+# dlocate \-l mythtv | grep '^.i' | awk '{print $2}' | xargs dpkg\-repack
 .br
 dpkg-deb: building package `libmythtv-perl' in `./libmythtv-perl_0.21.svn20090414-0.0_amd64.deb'.
 .br
@@ -275,12 +272,11 @@
 dpkg-deb: building package `python-mythtv' in `./python-mythtv_0.21.svn20090414-0.0_amd64.deb'.
 .br
 
-
 .SH ENVIRONMENT VARIABLES
 .TP
 .BR COLUMNS
 Sets the number of columns \fBdlocate\fP should use when displaying formatted
-text.  Currently only used by \-l. Values lower than 80 are ignored.
+text. Currently only used by \-l. Values lower than 80 are ignored.
 
 .SH "SEE ALSO"
 \fBdpkg\fP(1),
@@ -289,8 +285,6 @@
 and
 \fBgrep\-dctrl\fP(1).
 
-
-
 .SH AUTHOR
 dlocate was written by Jim Pick <j...@pick.com> and Craig Sanders
 <c...@taz.net.au>. dlocate is Free Software licensed under the GNU
diff -Nru dlocate-1.02/dlocate-completion dlocate-1.02+nmu3/dlocate-completion
--- dlocate-1.02/dlocate-completion	2008-06-27 12:24:00.000000000 +0200
+++ dlocate-1.02+nmu3/dlocate-completion	2012-12-29 14:23:15.000000000 +0100
@@ -15,7 +15,7 @@
 		return 0
 		;;
 	-@(L|l|s|ls|du|conf|lsconf|md5sum|md5check|man))
-		COMPREPLY=( $( _comp_dpkg_installed_packages $cur ) )
+		COMPREPLY=( $( _xfunc dpkg _comp_dpkg_installed_packages "$cur" ) )
 		return 0
 		;;
 	*)
diff -Nru dlocate-1.02/dpkg-hold.8 dlocate-1.02+nmu3/dpkg-hold.8
--- dlocate-1.02/dpkg-hold.8	2009-06-02 02:00:47.000000000 +0200
+++ dlocate-1.02+nmu3/dpkg-hold.8	2012-12-29 14:23:15.000000000 +0100
@@ -4,8 +4,7 @@
 .\" other parms are allowed: see man(7), man(1)
 
 .SH NAME
-dpkg-hold - program to flag for hold a package or packages
-
+dpkg-hold - mark packages as `hold' to prevent installation
 
 .SH SYNOPSIS
 .B dpkg-hold
@@ -16,14 +15,13 @@
 .B dpkg-hold
 marks package(s) to be held.
 
-It achieves this by running `dpkg --set-selections' and piping in the
+It achieves this by running `dpkg \-\-set\-selections' and piping in the
 package name(s) followed by `hold'.
 
-NOTE: this program does not install, remove, purge any package. it ONLY
+NOTE: This program does not install, remove, purge any package. It ONLY
 sets the status of the package. Any actual removal or purging is done
 the next time dselect, apt-get, aptitude, etc are run.
 
-
 .SH "SEE ALSO"
 \fBdpkg\fP(1),
 \fBdpkg-unhold\fP(1),
diff -Nru dlocate-1.02/dpkg-purge.8 dlocate-1.02+nmu3/dpkg-purge.8
--- dlocate-1.02/dpkg-purge.8	2009-06-02 02:00:53.000000000 +0200
+++ dlocate-1.02+nmu3/dpkg-purge.8	2012-12-29 14:23:15.000000000 +0100
@@ -4,8 +4,7 @@
 .\" other parms are allowed: see man(7), man(1)
 
 .SH NAME
-dpkg-purge - program to flag for purge a package or packages
-
+dpkg-purge - mark packages for purge
 
 .SH SYNOPSIS
 .B dpkg-purge
@@ -16,14 +15,13 @@
 .B dpkg-purge
 marks package(s) to be purged.
 
-It achieves this by running `dpkg --set-selections' and piping in the
+It achieves this by running `dpkg \-\-set\-selections' and piping in the
 package name(s) followed by `purge'.
 
-NOTE: this program does not install, remove, purge any package. it ONLY
+NOTE: This program does not install, remove, purge any package. It ONLY
 sets the status of the package. Any actual removal or purging is done
 the next time dselect, apt-get, aptitude, etc are run.
 
-
 .SH "SEE ALSO"
 \fBdpkg\fP(1),
 \fBdpkg-hold\fP(1),
diff -Nru dlocate-1.02/dpkg-remove.8 dlocate-1.02+nmu3/dpkg-remove.8
--- dlocate-1.02/dpkg-remove.8	2009-06-02 02:00:57.000000000 +0200
+++ dlocate-1.02+nmu3/dpkg-remove.8	2012-12-29 14:23:15.000000000 +0100
@@ -4,8 +4,7 @@
 .\" other parms are allowed: see man(7), man(1)
 
 .SH NAME
-dpkg-remove - program to flag for removal a package or packages
-
+dpkg-remove - mark packages for removal
 
 .SH SYNOPSIS
 .B dpkg-remove
@@ -14,16 +13,15 @@
 .SH "DESCRIPTION"
 .PP
 .B dpkg-remove
-marks package(s) to be held.
+marks package(s) to be removed.
 
-It achieves this by running `dpkg --set-selections' and piping in the
+It achieves this by running `dpkg \-\-set\-selections' and piping in the
 package name(s) followed by `deinstall'.
 
-NOTE: this program does not install, remove, purge any package. it ONLY
+NOTE: This program does not install, remove, purge any package. It ONLY
 sets the status of the package. any actual removal or purging is done
 the next time dselect, apt-get, aptitude, etc are run.
 
-
 .SH "SEE ALSO"
 \fBdpkg\fP(1),
 \fBdpkg-hold\fP(1),
diff -Nru dlocate-1.02/dpkg-unhold.8 dlocate-1.02+nmu3/dpkg-unhold.8
--- dlocate-1.02/dpkg-unhold.8	2009-06-02 02:01:03.000000000 +0200
+++ dlocate-1.02+nmu3/dpkg-unhold.8	2012-12-29 14:23:15.000000000 +0100
@@ -4,7 +4,7 @@
 .\" other parms are allowed: see man(7), man(1)
 
 .SH NAME
-dpkg-unhold - program to flag for installation a package or packages
+dpkg-unhold - mark held packages for installation
 
 
 .SH SYNOPSIS
@@ -14,22 +14,21 @@
 .SH "DESCRIPTION"
 .PP
 .B dpkg-unhold
-marks package(s) to be held.
+marks package(s) to be installed.
 
-it achieves this by running `dpkg --set-selections' and piping in the
+It achieves this by running `dpkg \-\-set\-selections' and piping in the
 package name(s) followed by `install'.
 
-NOTE: this program does not install, remove, purge any package. it ONLY
-sets the status of the package. any actual removal or purging is done
+NOTE: This program does not install, remove, purge any package. It ONLY
+sets the status of the package. Any actual removal or purging is done
 the next time dselect, apt-get, aptitude, etc are run.
 
 .SH "BUGS"
 
 The name is little bit of a misnomer in that it marks the package for
-installation. this effectively "unholds" the package if it is held, but
+installation. This effectively "unholds" the package if it is held, but
 will cause dselect/apt/etc to install it if it wasn't already installed.
 
-
 .SH "SEE ALSO"
 \fBdpkg\fP(1),
 \fBdpkg-hold\fP(1),
diff -Nru dlocate-1.02/update-dlocatedb.8 dlocate-1.02+nmu3/update-dlocatedb.8
--- dlocate-1.02/update-dlocatedb.8	2009-06-03 02:32:58.000000000 +0200
+++ dlocate-1.02+nmu3/update-dlocatedb.8	2012-12-29 14:23:15.000000000 +0100
@@ -12,7 +12,7 @@
 .\" .sp <n>    insert n+1 empty lines
 .\" for manpage-specific macros, see man(7)
 .SH NAME
-update\-dlocatedb - Generate text database of installed files for dlocate
+update\-dlocatedb - generate text database of installed files for dlocate
 
 .SH SYNOPSIS
 .B update\-dlocatedb
@@ -27,24 +27,24 @@
 .SH FILES
 .TP
 .I /etc/default/dlocate
-Configuration file with default options.  Currently the only option is
-to enable/disable gzip compression of the dlocatedb.txt file
+Configuration file with default options. Currently the only option is
+to enable/disable gzip compression of the dlocatedb file.
 .TP
 
 .I /var/lib/dpkg/info
-directory containing dpkg file lists
+Directory containing dpkg file lists
 .TP
 
 .TP
-.I /var/lib/dlocate/dlocatedb.txt
-plain text listing of all files belonging to all packages (optionally compressed)
+.I /var/lib/dlocate/dlocatedb
+Plain text listing of all files belonging to all packages (optionally compressed)
 
 .SH SEE ALSO
 .BR "dlocate(1)"
 .P
 .SH AUTHOR
 This version of update\-dlocatedb was written by Fredrik Hallenberg,
-Craig Sanders, and Pawel Chmielowski.  The manual page was written
+Craig Sanders, and Pawel Chmielowski. The manual page was written
 by Andreas Metzler <ametzler at downhill.at.eu.org> for the Debian
 GNU/Linux system (but may be used by others).
 

Reply via email to