This bug report was also filed in Ubuntu and can be found at
http://launchpad.net/bugs/801336
The description, from Michal Suchanek, follows:
apt-file search -gtkmozembed
Unknown option: g
Unknown option: t
Unknown option: k
Unknown option: m
Unknown option: o
Unknown option: z
Unknown option: e
Unknown option: m
Unknown option: b
Unknown option: e
Option d requires an argument
apt-file version 2.4.2
(c) 2002 Sebastien J. Gross <s...@debian.org>
apt-file [options] action [pattern]
apt-file [options] -f action <file>
apt-file [options] -D action <debfile>
Configuration options:
--sources-list -s <file> sources.list location
--cache -c <dir> Cache directory
--architecture -a <arch> Use specific architecture
--cdrom-mount -d <cdrom> Use specific cdrom mountpoint
--from-file -f Read patterns from file(s), one
per line
(use '-' for stdin)
--from-deb -D Use file list of .deb package(s) as
patterns; implies -F
--non-interactive -N Skip schemes requiring user input
(useful in cron jobs)
--package-only -l Only display packages name
--fixed-string -F Do not expand pattern
--ignore-case -i Ignore case distinctions
--regexp -x pattern is a regular expression
--verbose -v run in verbose mode
--dummy -y run in dummy mode (no action)
--help -h Show this help.
--version -V Show version number
Action:
update Fetch Contents files from
apt-sources.
search|find <pattern> Search files in packages
list|show <pattern> List files in packages
purge Remove cache files
Interpreting options after command both disables searching for patterns
starting with - and is in conflict with the help text that mandates
putting options before command.
Proposed patch:
A possible fix would be to always protect the arguments passed to zfgrep
like this:
--- /usr/bin/apt-file 2011-06-23 23:10:22.000000000 +0200
+++ ./apt-file.new 2011-06-23 23:13:04.000000000 +0200
@@ -355,7 +355,7 @@
else {
my $zgrep_pattern = $Conf->{pattern};
$zgrep_pattern =~ s{^\\/}{};
- $zcat = "zfgrep $ignore_case $zgrep_pattern";
+ $zcat = "zfgrep $ignore_case -- $zgrep_pattern";
}
}
my $regexp = eval { $Conf->{ignore_case} ? qr/$pattern/i :
qr/$pattern/ };
ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: apt-file 2.4.2
ProcVersionSignature: Ubuntu 3.0-1.2-generic 3.0.0-rc3
Uname: Linux 3.0-1-generic x86_64
Architecture: amd64
Date: Thu Jun 23 22:37:02 2011
PackageArchitecture: all
ProcEnviron:
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: apt-file
UpgradeStatus: No upgrade log present (probably fresh install)
-- System Information:
Debian Release: wheezy/sid
APT prefers oneiric
APT policy: (500, 'oneiric')
Architecture: i386 (i686)
Kernel: Linux 3.0-1-generic (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
--
To UNSUBSCRIBE, email to debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
On Thu, June 23, 2011 23:28, Jean-Baptiste Lallement wrote:
> apt-file search -gtkmozembed
> Unknown option: g
> Unknown option: t
> Unknown option: k
> Interpreting options after command both disables searching for patterns
> starting with - and is in conflict with the help text that mandates
> putting options before command.
>
> Proposed patch:
> A possible fix would be to always protect the arguments passed to zfgrep
> like this:
> --- /usr/bin/apt-file 2011-06-23 23:10:22.000000000 +0200
> +++ ./apt-file.new 2011-06-23 23:13:04.000000000 +0200
> @@ -355,7 +355,7 @@
> else {
> my $zgrep_pattern = $Conf->{pattern};
> $zgrep_pattern =~ s{^\\/}{};
> - $zcat = "zfgrep $ignore_case $zgrep_pattern";
> + $zcat = "zfgrep $ignore_case -- $zgrep_pattern";
> }
> }
> my $regexp = eval { $Conf->{ignore_case} ? qr/$pattern/i :
> qr/$pattern/ };
>
Thanks. I don't think this proposed solution will work, though, as the
'-gtkmozembed' are already parsed by our GetOpt. This would need a
different approach, e.g. to first split the command line into
options,command,pattern pieces and then to only parse options in the
options part.
Thijs