Debian Bug report logs - #202493
[apt-cache] apt-cache show <virtual package> prints nothing and exits successfully

version graph

Package: apt; Maintainer for apt is APT Development Team <deity@lists.debian.org>; Source for apt is src:apt.

Reported by: Dan Jacobson <jidanni@jidanni.org>

Date: Tue, 22 Jul 2003 21:48:15 UTC

Severity: wishlist

Tags: patch, upstream, wontfix

Found in version 0.5.5.1

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#202493; Package apt. Full text and rfc822 format available.

Acknowledgement sent to Dan Jacobson <jidanni@jidanni.org>:
New Bug report received and forwarded. Copy sent to APT Development Team <deity@lists.debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Dan Jacobson <jidanni@jidanni.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: /usr/bin/apt-cache: should show something for packages like awk
Date: Wed, 23 Jul 2003 03:45:26 +0800
Package: apt
Version: 0.5.5.1
Severity: normal
File: /usr/bin/apt-cache
Tags: upstream

$ apt-cache show awk
this really should say something, else it looks like the command is broken




Severity set to `minor'. Request was from Matt Zimmerman <mdz@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Changed Bug title. Request was from Matt Zimmerman <mdz@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#202493; Package apt. Full text and rfc822 format available.

Acknowledgement sent to Joshua Kwan <joshk@triplehelix.org>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>. Full text and rfc822 format available.

Message #14 received at 202493@bugs.debian.org (full text, mbox):

From: Joshua Kwan <joshk@triplehelix.org>
To: 202493@bugs.debian.org
Cc: jidanni@jidanni.org
Subject: agreement
Date: Mon, 28 Jul 2003 16:55:47 -0700
[Message part 1 (text/plain, inline)]
First time agreeing with Dan. This (lack of) functionality is always 
awkward. Ideally I would expect apt-cache show <virtualpackage> to show
me which packages Provides: this virtual package. For example, when
window shopping for a new MTA, I was unable to apt-cache show
mail-transport-agent, but i had to apt-get install it for me to show the
packages providing mail-transport-agent.

It's minor of course. i have since gotten used to apt-get installing 
virtual packages to see my choices.

-Josh
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#202493; Package apt. Full text and rfc822 format available.

Acknowledgement sent to Otavio Salvador <otavio@debian.org>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>. Full text and rfc822 format available.

Message #19 received at 202493@bugs.debian.org (full text, mbox):

From: Otavio Salvador <otavio@debian.org>
To: 202493@bugs.debian.org
Subject: patch to include this feature
Date: Mon, 28 Jul 2003 23:15:59 -0300
[Message part 1 (text/plain, inline)]
Hello Folks,

I'm including one simple patch to add this feature on apt-cache. Any
questions, fell free to contact me.

TIA,
Otavio
[apt-bug-202493.diff (text/plain, attachment)]
[Message part 3 (text/plain, inline)]
-- 
        O T A V I O    S A L V A D O R
---------------------------------------------
 E-mail: otavio@debian.org      UIN: 5906116
 GNU/Linux User: 239058     GPG ID: 49A5F855
 Home Page: http://www.freedom.ind.br/otavio
---------------------------------------------

Tags added: patch Request was from Otavio Salvador <otavio@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#202493; Package apt. Full text and rfc822 format available.

Acknowledgement sent to Matt Zimmerman <mdz@debian.org>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>. Full text and rfc822 format available.

Message #26 received at 202493@bugs.debian.org (full text, mbox):

From: Matt Zimmerman <mdz@debian.org>
To: 202493@bugs.debian.org
Subject: Wontfix
Date: Fri, 1 Aug 2003 16:05:21 -0400
tags 202493 wontfix
severity 202493 wishlist
thanks

apt-cache show has a defined output format; it does not carry on a plain
language dialogue with the user.  apt-cache showpkg already provides this
information.

-- 
 - mdz



Tags added: wontfix Request was from Matt Zimmerman <mdz@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Severity set to `wishlist'. Request was from Matt Zimmerman <mdz@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#202493; Package apt. Full text and rfc822 format available.

Acknowledgement sent to Otavio Salvador <otavio@debian.org>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>. Full text and rfc822 format available.

Message #35 received at 202493@bugs.debian.org (full text, mbox):

From: Otavio Salvador <otavio@debian.org>
To: Matt Zimmerman <mdz@debian.org>
Cc: 202493@bugs.debian.org
Subject: Re: Bug#202493: Wontfix
Date: Fri, 01 Aug 2003 21:00:39 -0300
Matt Zimmerman <mdz@debian.org> writes:

> tags 202493 wontfix
> severity 202493 wishlist
> thanks
>
> apt-cache show has a defined output format; it does not carry on a plain
> language dialogue with the user.  apt-cache showpkg already provides this
> information.

In IMHO this is not right. When we use apt-cache show <package> we
think this will return some useful information and in this case if we
use:

$: apt-cache show awk 


We don't receive any information. This looks like an APT mistake and
for many users can be dificult understand the reason. 

The present patch provide the same way of install to virtual packages
so the enduser will know witch packages provide this and can choice
one to be displayed.

This are a more clean way to display this information and looks more
right in IMHO.

TIA,
Otavio

-- 
        O T A V I O    S A L V A D O R
---------------------------------------------
 E-mail: otavio@debian.org      UIN: 5906116
 GNU/Linux User: 239058     GPG ID: 49A5F855
 Home Page: http://www.freedom.ind.br/otavio
---------------------------------------------



Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#202493; Package apt. Full text and rfc822 format available.

Acknowledgement sent to Martin Pitt <mpitt@debian.org>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>. Full text and rfc822 format available.

Message #40 received at 202493@bugs.debian.org (full text, mbox):

From: Martin Pitt <mpitt@debian.org>
To: 202493@bugs.debian.org
Subject: Re: apt-cache show <virtual package> prints nothing and exits successfully
Date: Mon, 4 Feb 2008 11:08:13 +0100
Hi!

I disagree with 'wontfix'. This is not limited to virtual packages.

It also happens if you install a fresh system and didn't do an initial
apt-get update, but packages are referred to through dependencies.

If apt-cache show does not know about a package, it should exit with a
nonzero status. Zero breaks all kinds of scripts which check
apt-cache's exit status and rely on sensible information.

Thank you for considering,

Martin
-- 
Martin Pitt        http://www.piware.de
Ubuntu Developer   http://www.ubuntu.com
Debian Developer   http://www.debian.org




Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#202493; Package apt. (Sat, 04 Oct 2008 16:12:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Luca Bruno <lethalman88@gmail.com>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>. (Sat, 04 Oct 2008 16:12:05 GMT) Full text and rfc822 format available.

Message #45 received at 202493@bugs.debian.org (full text, mbox):

From: Luca Bruno <lethalman88@gmail.com>
To: 202493@bugs.debian.org
Subject: agree with wontfix
Date: Sat, 4 Oct 2008 18:06:25 +0200
[Message part 1 (text/plain, inline)]
Hello,

>If apt-cache show does not know about a package, it should exit with a
>nonzero status. Zero breaks all kinds of scripts which check
>apt-cache's exit status and rely on sensible information.

apt-cache show accepts multiple packages, how would you decide the exit
status? WHen all of the given packages are not found? When one of the
packages are not found? When to exit?

In my opinion, the behavior for exit() would be too ambiguous.

Best regards,

-- 
http://syx.googlecode.com - Smalltalk YX
http://lethalman.blogspot.com - Thoughts about computer technologies
http://www.debian.org - The Universal Operating System
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#202493; Package apt. (Mon, 07 Feb 2011 22:15:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to David Kalnischkies <kalnischkies@gmail.com>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>. (Mon, 07 Feb 2011 22:15:03 GMT) Full text and rfc822 format available.

Message #50 received at 202493@bugs.debian.org (full text, mbox):

From: David Kalnischkies <kalnischkies@gmail.com>
To: 202493@bugs.debian.org
Subject: apt-cache show <virtual package> prints nothing and exits successfully
Date: Mon, 7 Feb 2011 23:12:10 +0100
Version: 0.7.26~exp12

Since this version the output for the command presented in the first message:

$ apt-cache show awk
N: Can't select versions from package 'awk' as it purely virtual
N: No packages found

So the initial request is satisfied (half way).

Note that the returncode is zero (success) as all sorts of tools (e.g. sbuild)
blow up if APT would fail in this case (we tried in earlier ~exp versions).

Showing a list of packages providing this virtual package might be
user-friendly in some way, but it is not expected by any tool and
a user will not expect it, too, as apt-cache is a lowlevel tool which
should do what it was told to do and not guess what the user might
have tried to say - and show should print the package record of the
requested package(s), not a list of packages you might want to feed
back to apt-cache show to see their package records.

Imagine a package which is real and also provided by some packages.
Should show now print a list of packages, show the record or both?


Best regards

David Kalnischkies




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 24 03:01:51 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.