Bug#775771: Bug#781203: cmdline API breakage -- "E: Command line option --installed is not understood"
On Thu, 26 Mar 2015, David Kalnischkies wrote:
> On Wed, Mar 25, 2015 at 08:04:24PM -0400, Yaroslav Halchenko wrote:
> > I just have discovered that our scripts broke on jessie because of now
> > --installed apparently is not supported, although still referred to in the
> > manpage and changelog doesn't point to any deprecation. So I just assume that
> > it is a bug: this functionality works on wheezy but not on jessie
> > $> apt-cache search --installed xserver
> > E: Command line option --installed is not understood
> --installed is still supported, but only by the commands which actually
> support it (which is just depends/rdepends at the moment).
should have not I RTFM more carefully? ;-) Thanks David
> Accepting options on all commands even through they aren't understood
> was deemed confusing, if not downright dangerous: Just look at the
> output you provided… I doubt you have all (potentially even any)
> package installed which was listed in your wheezy-chroot.
indeed... I was not spotted that behavior because the output was anyways
piped to dpkg --purge ;) It just was more semantically correct to
list only installed packages. And such operation seems to be in demand,
hence CCing now found #775771 (morning search is always better ;-) )
> Now, imagine I come along and actually implement support for this flag:
> That will drastically change the behavior and might silently break your
> script until you figure out that apt now does what you asked it to do…
I don't think so -- if people explicitly asked for --installed, they
meant it. So if anything, it should only become better ;-)
> So the fix is indeed simple and can be applied for any Debian release:
> Please fix your script. ;)
> Note: It sounds like we are talking about your own local script hence
> this blant suggestion. [...]
well -- the script is a part of the source package which is stuck in NEW
for ... 7 months now, thus can't reportbug, but already fixed it up ;)
--
Yaroslav O. Halchenko, Ph.D.
http://neuro.debian.net http://www.pymvpa.org http://www.fail2ban.org
Research Scientist, Psychological and Brain Sciences Dept.
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834 Fax: +1 (603) 646-1419
WWW: http://www.linkedin.com/in/yarik
Reply to: