`apt-cache show gphoto2' is silent and exits 0.

Bug #18306 reported by Ralph Corderoy
18
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt (Debian)
Won't Fix
Unknown
apt (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

apt-cache's `show' sub-command seems to half-know about some packages, e.g.
gphoto2. It doesn't display any information, but it doesn't give an error
either.

    $ apt-cache show foo
    W: Unable to locate package foo
    E: No packages found
    $ echo $?
    100
    $ apt-cache show gphoto2
    $ echo $?
    0
    $ apt-cache show gphoto2 2>&1 | wc -c
    0
    $

It works for some packages.

    $ apt-cache show libgphoto2-2
    Package: libgphoto2-2
    Priority: optional
    Section: libs
    Installed-Size: 2976
    Maintainer: Frederic Peters <email address hidden>
    Architecture: i386
    Source: libgphoto2
    Version: 2.1.5-2ubuntu1
    Depends: libc6 (>= 2.3.2.ds1-4), libexif10, libgphoto2-port0 (>=
2.1.5-2ubuntu1), libjpeg62, adduser
 -> Suggests: gphoto2 (>= 2.1.1), gtkam
    Conflicts: gphoto2 (<= 2.1.1)
    Filename: pool/main/libg/libgphoto2/libgphoto2-2_2.1.5-2ubuntu1_i386.deb
    Size: 823652
    MD5Sum: b69e0a3667108525758d658c913863fc
    Description: The gphoto2 digital camera library
     The gphoto2 library can be used by applications to access various
     digital camera models.
     .
     This package contains the library.
     .
 -> The gphoto2 command-line frontend is shipped separately, in the gphoto2
 -> package.
    Bugs: mailto:<email address hidden>
    Origin: Ubuntu
    Task: ubuntu-desktop

    $

It should display the info or error.

Revision history for this message
In , Matt Zimmerman (mdz) wrote : bug reorg

retitle 81829 [libapt-pkg] apt-get segfaults on corrupt /var/cache/apt/*.bin
retitle 93453 [libapt-pkg] apt-get segfaults on corrupt /var/cache/apt/*.bin
retitle 98017 [libapt-pkg] apt-get segfaults on corrupt /var/cache/apt/*.bin
retitle 165448 [libapt-pkg] apt-get segfaults on corrupt /var/cache/apt/*.bin
retitle 166306 [libapt-pkg] apt-get segfaults on corrupt /var/cache/apt/*.bin
retitle 171248 [libapt-pkg] apt-get segfaults on corrupt /var/cache/apt/*.bin
retitle 173616 [libapt-pkg] apt-get segfaults on corrupt /var/cache/apt/*.bin
retitle 177604 [libapt-pkg] apt-get segfaults on corrupt /var/cache/apt/*.bin
retitle 177871 [libapt-pkg] apt-get segfaults on corrupt /var/cache/apt/*.bin
retitle 186366 [libapt-pkg] apt-get segfaults on corrupt /var/cache/apt/*.bin
severity 192228 normal
merge 92193 192228
retitle 92193 [dpkgpm] infinite loop reading stdin
retitle 197828 [dpkgpm] apt: uses all of cpu waiting for disk
retitle 192228 [dpkgpm] infinite loop reading stdin
retitle 119509 [apt-get] install and update should be mutually exclusive
retitle 194467 [apt-get] install and update should be mutually exclusive
retitle 137433 [policy] apt: -t option fails to give warning when ignoring you
retitle 137560 [apt-get] build-dep does not remove conflicting packages to satisfy dependencies (should it?)
retitle 152711 [methods/http] apt has problems with chunked encoding or publicfile?
retitle 172339 [dpkgpm] apt feeds packages with circular deps to dpkg problematically
retitle 22550 [dpkgpm] apt-get upgrade could configure packages earlier
retitle 190558 [dpkgpm] many packages may be unconfigured after apt-get
retitle 174945 [tagfile] apt: installing package with lots of conffiles breaks apt (field larger than 32k)
retitle 175034 [methods/ftp] apt/dpkg ipv6 ftp problem (EPTR)
retitle 177952 [policy] apt-get dist-upgrade with Pin-Priority of woody>sarge replaces woody's *utils with sarge's coreutils
retitle 191309 [methods/http] apt: non-blocking error with http method on nfs root
retitle 198730 [methods/cdrom] cdroms.list created by 0.3.19 not recognized/converted properly
retitle 200953 [i18n] apt-get questions are broken on ru_RU.KOI8-R locale
severity 202493 minor
retitle 202493 [apt-cache] apt-cache show <virtual package> prints nothing and exits successfully
thanks

--
 - mdz

Revision history for this message
In , Joshua Kwan (joshk) wrote : agreement

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

Revision history for this message
In , Otavio Salvador (otavio) wrote : patch to include this feature

Hello Folks,

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

TIA,
Otavio

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

Revision history for this message
In , Otavio Salvador (otavio) wrote : tagging 202493

tag 202493 + patch

Revision history for this message
In , Matt Zimmerman (mdz) wrote : Wontfix

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

Revision history for this message
In , Otavio Salvador (otavio) wrote : Re: Bug#202493: Wontfix

Matt Zimmerman <email address hidden> 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: <email address hidden> UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://www.freedom.ind.br/otavio
---------------------------------------------

Revision history for this message
Ralph Corderoy (ralph-inputplus) wrote :

apt-cache's `show' sub-command seems to half-know about some packages, e.g.
gphoto2. It doesn't display any information, but it doesn't give an error
either.

    $ apt-cache show foo
    W: Unable to locate package foo
    E: No packages found
    $ echo $?
    100
    $ apt-cache show gphoto2
    $ echo $?
    0
    $ apt-cache show gphoto2 2>&1 | wc -c
    0
    $

It works for some packages.

    $ apt-cache show libgphoto2-2
    Package: libgphoto2-2
    Priority: optional
    Section: libs
    Installed-Size: 2976
    Maintainer: Frederic Peters <email address hidden>
    Architecture: i386
    Source: libgphoto2
    Version: 2.1.5-2ubuntu1
    Depends: libc6 (>= 2.3.2.ds1-4), libexif10, libgphoto2-port0 (>=
2.1.5-2ubuntu1), libjpeg62, adduser
 -> Suggests: gphoto2 (>= 2.1.1), gtkam
    Conflicts: gphoto2 (<= 2.1.1)
    Filename: pool/main/libg/libgphoto2/libgphoto2-2_2.1.5-2ubuntu1_i386.deb
    Size: 823652
    MD5Sum: b69e0a3667108525758d658c913863fc
    Description: The gphoto2 digital camera library
     The gphoto2 library can be used by applications to access various
     digital camera models.
     .
     This package contains the library.
     .
 -> The gphoto2 command-line frontend is shipped separately, in the gphoto2
 -> package.
    Bugs: mailto:<email address hidden>
    Origin: Ubuntu
    Task: ubuntu-desktop

    $

It should display the info or error.

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your bugreport.

I can't reproduce this on my hoary and breezy system. What does
"apt-cache showpkg gphoto2"

display?

Thanks,
 Michael

Revision history for this message
Ralph Corderoy (ralph-inputplus) wrote :

(In reply to comment #1)
> I can't reproduce this on my hoary and breezy system. What does
> "apt-cache showpkg gphoto2" display?

    $ apt-cache showpkg gphoto2
    Package: gphoto2
    Versions:

2.1.5-1(/var/lib/apt/lists/gb.archive.ubuntu.com_ubuntu_dists_hoary_universe_binary-i386_Packages)(/var/lib/dpkg/status)

    Reverse Depends:
      dcraw,gphoto2
      libgphoto2-port0,gphoto2 2.1.1
      libgphoto2-port0,gphoto2 2.1.0
      libgphoto2-2,gphoto2 2.1.1
      libgphoto2-2,gphoto2 2.1.1
    Dependencies:
    2.1.5-1 - libc6 (2 2.3.2.ds1-4) libcdk4 (0 (null)) libexif10 (0 (null))
libgphoto2-2 (2 2.1.4-10ubuntu1) libgphoto2-port0 (2 2.1.4-10ubuntu1) libjpeg62
(0 (null)) libncurses5 (2 5.4-1) libreadline4 (2 4.3-1) gtkam (0 (null)) gthumb
(0 (null))
    Provides:
    2.1.5-1 -
    Reverse Provides:
    $ echo $?
    0
    $

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <E19f34g-0000l3-8d@debian>
Date: Wed, 23 Jul 2003 03:45:26 +0800
From: Dan Jacobson <email address hidden>
To: Debian Bug Tracking System <email address hidden>
Subject: /usr/bin/apt-cache: should show something for packages like awk

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

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Tue, 22 Jul 2003 23:15:46 -0400
From: Matt Zimmerman <email address hidden>
To: <email address hidden>
Subject: bug reorg

retitle 81829 [libapt-pkg] apt-get segfaults on corrupt /var/cache/apt/*.bin
retitle 93453 [libapt-pkg] apt-get segfaults on corrupt /var/cache/apt/*.bin
retitle 98017 [libapt-pkg] apt-get segfaults on corrupt /var/cache/apt/*.bin
retitle 165448 [libapt-pkg] apt-get segfaults on corrupt /var/cache/apt/*.bin
retitle 166306 [libapt-pkg] apt-get segfaults on corrupt /var/cache/apt/*.bin
retitle 171248 [libapt-pkg] apt-get segfaults on corrupt /var/cache/apt/*.bin
retitle 173616 [libapt-pkg] apt-get segfaults on corrupt /var/cache/apt/*.bin
retitle 177604 [libapt-pkg] apt-get segfaults on corrupt /var/cache/apt/*.bin
retitle 177871 [libapt-pkg] apt-get segfaults on corrupt /var/cache/apt/*.bin
retitle 186366 [libapt-pkg] apt-get segfaults on corrupt /var/cache/apt/*.bin
severity 192228 normal
merge 92193 192228
retitle 92193 [dpkgpm] infinite loop reading stdin
retitle 197828 [dpkgpm] apt: uses all of cpu waiting for disk
retitle 192228 [dpkgpm] infinite loop reading stdin
retitle 119509 [apt-get] install and update should be mutually exclusive
retitle 194467 [apt-get] install and update should be mutually exclusive
retitle 137433 [policy] apt: -t option fails to give warning when ignoring you
retitle 137560 [apt-get] build-dep does not remove conflicting packages to satisfy dependencies (should it?)
retitle 152711 [methods/http] apt has problems with chunked encoding or publicfile?
retitle 172339 [dpkgpm] apt feeds packages with circular deps to dpkg problematically
retitle 22550 [dpkgpm] apt-get upgrade could configure packages earlier
retitle 190558 [dpkgpm] many packages may be unconfigured after apt-get
retitle 174945 [tagfile] apt: installing package with lots of conffiles breaks apt (field larger than 32k)
retitle 175034 [methods/ftp] apt/dpkg ipv6 ftp problem (EPTR)
retitle 177952 [policy] apt-get dist-upgrade with Pin-Priority of woody>sarge replaces woody's *utils with sarge's coreutils
retitle 191309 [methods/http] apt: non-blocking error with http method on nfs root
retitle 198730 [methods/cdrom] cdroms.list created by 0.3.19 not recognized/converted properly
retitle 200953 [i18n] apt-get questions are broken on ru_RU.KOI8-R locale
severity 202493 minor
retitle 202493 [apt-cache] apt-cache show <virtual package> prints nothing and exits successfully
thanks

--
 - mdz

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <20030728235547.GA4993@firesong>
Date: Mon, 28 Jul 2003 16:55:47 -0700
From: Joshua Kwan <email address hidden>
To: <email address hidden>
Cc: <email address hidden>
Subject: agreement

--1yeeQ81UyVL57Vl7
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

First time agreeing with Dan. This (lack of) functionality is always=20
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=20
virtual packages to see my choices.

-Josh

--1yeeQ81UyVL57Vl7
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/JbgDT2bz5yevw+4RArY1AKCvYuxGSm78bA240uZ2j2C4m7g5rgCg3DhY
h793NkTe4rxzK4sEE+TdwyI=
=bQyt
-----END PGP SIGNATURE-----

--1yeeQ81UyVL57Vl7--

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Mon, 28 Jul 2003 23:15:59 -0300
From: Otavio Salvador <email address hidden>
To: <email address hidden>
Subject: patch to include this feature

--=-=-=

Hello Folks,

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

TIA,
Otavio

--=-=-=
Content-Disposition: attachment; filename=apt-bug-202493.diff

Index: cmdline/apt-cache.cc
===================================================================
RCS file: /cvs/deity/apt/cmdline/apt-cache.cc,v
retrieving revision 1.65
diff -u -r1.65 apt-cache.cc
--- cmdline/apt-cache.cc 22 Jul 2003 03:10:01 -0000 1.65
+++ cmdline/apt-cache.cc 29 Jul 2003 02:11:36 -0000
@@ -1358,6 +1358,19 @@

       ++found;

+ // Show virtual packages
+ if (Pkg->ProvidesList != 0)
+ {
+ ioprintf(std::cout,_("Package %s is a virtual package provided by:\n"),
+ Pkg.Name());
+
+ pkgCache::PrvIterator I = Pkg.ProvidesList();
+ for (; I.end() == false; I++)
+ cout << " " << I.OwnerPkg().Name() << endl;
+ cout << _("You should explicitly select one to show.") << endl;
+ continue;
+ }
+
       // Find the proper version to use.
       if (_config->FindB("APT::Cache::AllVersions","true") == true)
       {

--=-=-=

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

--=-=-=--

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Mon, 28 Jul 2003 23:16:11 -0300
From: Otavio Salvador <email address hidden>
To: <email address hidden>
Subject: tagging 202493

tag 202493 + patch

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Fri, 1 Aug 2003 16:05:21 -0400
From: Matt Zimmerman <email address hidden>
To: <email address hidden>
Subject: Wontfix

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

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Fri, 01 Aug 2003 21:00:39 -0300
From: Otavio Salvador <email address hidden>
To: Matt Zimmerman <email address hidden>
Cc: <email address hidden>
Subject: Re: Bug#202493: Wontfix

Matt Zimmerman <email address hidden> 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: <email address hidden> UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://www.freedom.ind.br/otavio
---------------------------------------------

Revision history for this message
Steven Harms (sharms) wrote :

Issue is not present in Dapper.

Changed in apt:
status: Unconfirmed → Fix Released
Revision history for this message
Ralph Corderoy (ralph-inputplus) wrote :

I think Steve Harms is wrong above. The problem still remains in
Dapper. It's just gphoto2 appears to have changed from a virtual
package to a real one. But the problem remains with awk.

    $ t() { apt-cache show $1 >/tmp/t 2>&1; echo $?; wc -c /tmp/t; }
    $ t foo
    100
    53 /tmp/t
    $ cat /tmp/t
    W: Unable to locate package foo
    E: No packages found
    $ t gphoto2
    0
    755 /tmp/t
    $ t awk
    0
    0 /tmp/t
    $

Revision history for this message
Ralph Corderoy (ralph-inputplus) wrote :

Present now in Dapper as well so reversing Steve's Unconfirmed -> Fix Released change but making it Confirmed.

Changed in apt:
status: Fix Released → Confirmed
Revision history for this message
Steven Harms (sharms) wrote :

The broader issue is actually a 'Wishlist' request, and upstream considers it a "WONTFIX" while the specific bug of gphoto2 being silent was resolved. I will wait for your input, but we should probably at the very least leave it as a wishlist item.

Revision history for this message
Rocco Stanzione (trappist) wrote :

I'm setting this bug to fix released, because there has been no activity here for about 6 weeks and the original bug report has indeed been fixed. If there is a request out there to make apt-cache more informative when 'show'-ing a virtual package, please create a new ticket.

Changed in apt:
status: Confirmed → Fix Released
Changed in apt:
status: Confirmed → Won't Fix
Revision history for this message
Ralph Corderoy (ralph-inputplus) wrote :

Here's the situation on 7.04.

    $ apt-cache show awk
    $ echo $?
    0
    $ dpkg -p awk
    Package `awk' is not available.
    Use dpkg --info (= dpkg-deb --info) to examine archive files,
    and dpkg --contents (= dpkg-deb --contents) to list their contents.
    $ echo $?
    1
    $ dpkg-query -p awk
    Package `awk' is not available.
    Use dpkg --info (= dpkg-deb --info) to examine archive files,
    and dpkg --contents (= dpkg-deb --contents) to list their contents.
    $ echo $?
    1

apt-cache(8) says:

    show pkg(s)
        show performs a function similar to dpkg --print-avail; it
        displays the package records for the named packages.

It doesn't state that it will display no output for virtual packages.
(I may not have got the correct term, or covered all the situations
apt-cache remains silent.) Nor does it say the exit status won't
reflect that the package was a virtual one.

It says it's similar to `dpkg -p' but there's clearly some differences;
dpkg and dpkg-query both complain to stderr and exit(1). Indeed, they
do these even if some of the packages exist.

    $ dpkg -p awk binutils >1 2>2
    $ echo $?
    1
    $ cat 1

    Package: binutils
    Priority: standard
    Section: devel
    Installed-Size: 7392
    Maintainer: Ubuntu Core Developers <email address hidden>
    Architecture: i386
    Version: 2.17.20070103cvs-0ubuntu2
    Provides: elf-binutils
    Depends: libc6 (>= 2.5-0ubuntu1)
    Suggests: binutils-doc (= 2.17.20070103cvs-0ubuntu2)
    Conflicts: gas, elf-binutils, modutils (<< 2.4.19-1)
    Size: 1580378
    Description: The GNU assembler, linker and binary utilities
     The programs in this package are used to assemble, link and manipulate
     binary and object files. They may be used in conjunction with a compiler
     and various libraries to build programs.
    Original-Maintainer: James Troup <email address hidden>
    $ cat 2
    Package `awk' is not available.
    Use dpkg --info (= dpkg-deb --info) to examine archive files,
    and dpkg --contents (= dpkg-deb --contents) to list their contents.
    $

At the very least, apt-cache(8) can be improved. Otherwise people who
RTFM, like me, will still waste their time investigating what apparently
isn't a bug. But I think the behaviour of dpkg and dpkg-query argue
that apt-cache should also issue a diagnostic and alter its exit status
to non-zero. Matt Zimmerman above says

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

What is it that would get upset if apt-cache's behaviour changed?

Changed in apt:
status: Fix Released → Confirmed
Revision history for this message
In , Martin Pitt (pitti) wrote : Re: apt-cache show <virtual package> prints nothing and exits successfully

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

Revision history for this message
Martin Pitt (pitti) wrote :

As I just wrote to the Debian bug, this is a little nuisance. If apt-cache show <package> does not have information about a package, it should exit with a nonzero status. This bug just bit me again (see bug 186943), in a freshly installed system "apt-cache show nvidia-glx" succeeds and prints nothing. This is counterintuitive behaviour and breaks the usual paradigm of writing scripts and checking its exit status.

Revision history for this message
In , Luca Bruno (lucabru) wrote : agree with wontfix

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

Michael Vogt (mvo)
Changed in apt:
assignee: mvo → nobody
Revision history for this message
rusivi2 (rusivi2-deactivatedaccount) wrote :

Thank you for posting this issue.

Does it occur in Lucid?

Changed in apt (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
rusivi2 (rusivi2-deactivatedaccount) wrote :

In Maverick at the Terminal:

apt-cache show gphoto2
Package: gphoto2
Priority: extra
Section: universe/utils
Installed-Size: 1004
Maintainer: Ubuntu MOTU Developers <email address hidden>
Original-Maintainer: Debian PhotoTools Maintainers <email address hidden>
Architecture: i386
Version: 2.4.5-2
Depends: libaa1 (>= 1.4p5), libc6 (>= 2.4), libcdk5, libexif12, libgphoto2-2 (>= 2.4.3), libgphoto2-port0 (>= 2.4.3), libjpeg62, libncurses5 (>= 5.6+20071006-3), libpopt0 (>= 1.14), libreadline5 (>= 5.2)
Suggests: gtkam, gthumb
Filename: pool/universe/g/gphoto2/gphoto2_2.4.5-2_i386.deb
Size: 216338
MD5sum: ed274bcce0849e31c68e90b3d9c8a25a
SHA1: 981a1bc24eedbc511f7745578aa19a01ea84d43b
SHA256: 0339635f2c022abf2f2f494c7647cae8706fd792c764ce8fdac28b78c35ec6f7
Description: The gphoto2 digital camera command-line client
 The gphoto2 library can be used by applications to access various
 digital camera models, via standard protocols such as USB Mass Storage
 and PTP, or vendor-specific protocols.
 .
 This package provide the gphoto2 command-line frontend.
Homepage: http://www.gphoto.org/proj/gphoto2/
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu

This issue is fixed. Marking as such.

Changed in apt (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
Ralph Corderoy (ralph-inputplus) wrote :

It does not matter that gphoto2 now displays different information. That was an example package back then. I don't see anything that suggests 10.10 has fixed the underlying issue. On 10.04 I still get

    $ apt-cache show awk
    $ echo $?
    0
    $

Please ensure the issue is fully understood rather than just cut and pasting earlier examples. It isn't beneficial to close bugs if the underlying issue still exists, it's just fiddling the figures!

Changed in apt (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
Evgeny Kapun (abacabadabacaba) wrote :

Well, on Maverick, it's fixed:

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

Changed in apt (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Ralph Corderoy (ralph-inputplus) wrote : Re: [Bug 18306] Re: `apt-cache show gphoto2' is silent and exits 0.

> Well, on Maverick, it's fixed:
>
> $ apt-cache show awk
> N: Can't select versions from package 'awk' as it purely virtual
> N: No packages found

Thanks Eugene. Does it have a non-zero exit status too? E.g.

    apt-cache show awk; echo $?

Revision history for this message
Evgeny Kapun (abacabadabacaba) wrote :

No, it doesn't. Zero exit status seems correct to me, as there are no errors.
BTW, `apt-cache show' will exit with zero status if at least one package exists, so:

$ apt-cache show coreutils package-that-does-not-exist
Package: coreutils
<...>
Task: minimal

N: Unable to locate package package-that-does-not-exist
$ echo $?
0
$ apt-cache show awk package-that-does-not-exist
N: Can't select versions from package 'awk' as it purely virtual
N: Unable to locate package package-that-does-not-exist
N: No packages found
$ echo $?
0
$ apt-cache show package-that-does-not-exist
N: Unable to locate package package-that-does-not-exist
E: No packages found
$ echo $?
100

So, apt-cache exits with non-zero status iff there are errors (lines starting with `E:'). Lines starting with `E:' are output to stderr, while everything else is output to stdout.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.