Bug 429597 - "yum list available" only shows uninstalled packages
"yum list available" only shows uninstalled packages
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-01-21 16:13 EST by Frank Sweetser
Modified: 2014-01-21 18:01 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-01-24 10:16:49 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Frank Sweetser 2008-01-21 16:13:41 EST
Running "yum list available <foo>" only appears to return results for package
<foo> if it is not already installed on the local system:

[root@bacula-test ~]# rpm -q httpd
package httpd is not installed
[root@bacula-test ~]# yum list available httpd
Available Packages
httpd.i386                               2.2.6-3                fedora          
[root@bacula-test ~]# yum -y install httpd
Setting up Install Process

(normal yum installation trimmed)

[root@bacula-test ~]# yum list available httpd
Error: No matching Packages to list
[root@bacula-test ~]# rpm -e httpd
[root@bacula-test ~]# yum list available httpd
Available Packages
httpd.i386                               2.2.6-3                fedora
Comment 1 James Antill 2008-01-21 16:31:14 EST
 Do you really want: repoquery -q httpd
 Note that repoquery is available in the yum-utils package.
Comment 2 Seth Vidal 2008-01-21 16:34:08 EST
 What are you trying to do where you're using the output there?

yum list available is only supposed to return packages which are NOT installed.
That's the intention.

If you can explain what you need maybe we can provide an alternative way to get
the same information.
Comment 3 Frank Sweetser 2008-01-21 17:19:57 EST
Okay, I didn't see in the docs anywhere the list available is intended to skip
installed packages (at least, it doesn't appear in the relevant section of the
man page).  In that case, I may have simply filed this under the wrong package,
as the error is coming from the puppet package.

More specifically, puppet can be told to use yum to ensure that the latest
version of a specific package is installed.  The 0.23 branch calls yum list
available to see what the latest version should be, and compares it to rpm -q to
see what is installed.  If a newer version is available, it calls out again to
yum to upgrade the package.

From the comments so far, it sounds to me like puppet is misusing the list
available command.  If I'm right, let me know what the recommended method would
be and I'll open a ticket upstream with the puppet maintainers.

Comment 4 Seth Vidal 2008-01-24 10:16:49 EST
talk the puppet maintainers. I thought they had removed their horrible screen
scraper from puppet for something else. I'm going to close this as it is not a
bug in yum.

Note You need to log in before you can comment on or make changes to this bug.