Bug 429597

Summary: "yum list available" only shows uninstalled packages
Product: [Fedora] Fedora Reporter: Frank Sweetser <fs>
Component: yumAssignee: Seth Vidal <skvidal>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 8CC: ffesti, james.antill, katzj, pmatilai, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-24 15:16:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Frank Sweetser 2008-01-21 21:13:41 UTC
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)

Complete!
[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 21:31:14 UTC
 Do you really want: repoquery -q httpd
 Note that repoquery is available in the yum-utils package.


Comment 2 Seth Vidal 2008-01-21 21:34:08 UTC
Frank,
 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 22:19:57 UTC
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.

Thanks

Comment 4 Seth Vidal 2008-01-24 15:16:49 UTC
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.