Bug 1055132

Summary: "yum repo-pkgs <repoid> list" doesn't work
Product: [Fedora] Fedora Reporter: Alan Stern <stern>
Component: yumAssignee: James Antill <james.antill>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 20CC: admiller, ffesti, jzeleny, packaging-team-maint, zpavlas
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: yum-3.4.3-132.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1056489 (view as bug list) Environment:
Last Closed: 2014-01-23 11:09:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1056489    

Description Alan Stern 2014-01-19 03:53:47 UTC
Description of problem:
The command "yum repo-pkgs <repoid> list" fails with an error message.

Version-Release number of selected component (if applicable):
yum-3.4.3-130.fc20.noarch

How reproducible:
Completely

Steps to Reproduce:
1. (as root) yum repo-pkgs fedora/20/i386 list

Actual results:
Loaded plugins: refresh-packagekit
Error: Need to pass a single valid repoid. to repo-pkgs
 Mini usage:

repo-pkgs <repoid> <list|info|install|remove|upgrade|reinstall*|remove-or-*> [pkg(s)]

Treat a repo. as a group of packages, so we can install/remove all of them

aliases: repo-packages, repository-pkgs, repository-packages


Expected results:
A list of all the packages included in the fedora/20/i386 repository.

Additional info:
Note that "fedora/20/i386" is a valid repoid:

# yum repolist
Loaded plugins: refresh-packagekit
repo id                           repo name                               status
fedora/20/i386                    Fedora 20 - i386                        32,493
rpmfusion-free/20/i386            RPM Fusion for Fedora 20 - Free            391
rpmfusion-free-updates/20/i386    RPM Fusion for Fedora 20 - Free - Updat    138
updates/20/i386                   Fedora 20 - i386 - Updates               9,691
repolist: 42,413

Comment 1 Jan Zeleny 2014-01-20 09:21:18 UTC
You probably don't use the right name of the repo? Last time I checked, the repo was just called fedora (cat /etc/yum.repos.d/fedora.repo). Please check and reopen if you confirm you are using the correct repo name.

Comment 2 Alan Stern 2014-01-20 17:20:08 UTC
You are right; specifying "fedora" as the repoid works.  Thank you.  And I see that the documentation for the repo files says that the repoid is specified in brackets at the top of each repository's section.

But this means there's a bug in "yum repolist".  The first column of the output is documented as being the repoid (possibly starting with a special character).  Therefore "yum repolist" should have produced "fedora", not "fedora/20/i386".

Comment 3 Alan Stern 2014-01-20 18:18:57 UTC
Another bug: The output from "yum repo-pkgs <repoid> list" is incomplete.  Here's an example:

# yum list bash
Loaded plugins: refresh-packagekit
Installed Packages
bash.i686                        4.2.45-4.fc20                         installed
# yum repo-pkgs fedora list all | grep ^bash
bash-completion.noarch                   1:2.1-3.fc20                     fedora
bash-doc.i686                            4.2.45-4.fc20                    fedora
bashdb.noarch                            4.2_0.8-3.fc20                   fedora

I checked a mirror of the Fedora 20/i686 Everything repository; it really does include bash-4.2.45-4.fc20.i686.rpm.  It looks like the output omits packages that are currently installed, even with the "all" specifier.

Comment 4 Jan Zeleny 2014-01-21 07:46:10 UTC
Just tried that on Fedora 19 and I didn't encounter any problems, yum listed both installed and available packages, bash included. The only way I can think of this might happen is when you install your bash for example from Fedora DVD and thus yum doesn't know that the installed package comes from Fedora repo. See the difference, this is your listing of the bash package:

bash.i686                        4.2.45-4.fc20                         installed

and this is mine (notice the @fedora at the end of the line):

bash.x86_64                              4.2.45-1.fc19                   @fedora

Comment 5 Alan Stern 2014-01-21 20:15:12 UTC
It's also possible that the difference was caused by the fact that we are running different versions of Fedora.

My copy of the bash package was installed by fedup.  Nevertheless, the system does seem to know where it came from.  I'm using a different computer now, but the results are the same:

# yum repo-pkgs fedora list all | grep ^bash
bash-completion.noarch                   1:2.1-3.fc20                     fedora
bash-doc.i686                            4.2.45-4.fc20                    fedora
bashdb.noarch                            4.2_0.8-3.fc20                   fedora
# find-repos-of-install --repoid=fedora bash
Loaded plugins: refresh-packagekit
bash-4.2.45-4.fc20.i686 from repo fedora

Comment 6 Jan Zeleny 2014-01-22 08:03:52 UTC
Ok, that seems like a regular bug, reopening and assigning to James for further evaluation.

Comment 7 Zdeněk Pavlas 2014-01-22 09:54:52 UTC
Fixed this (repoid bug) upstream already: http://yum.baseurl.org/gitweb?p=yum.git;a=commitdiff;h=6aa247420.

Comment 8 Fedora Update System 2014-01-22 10:54:40 UTC
yum-3.4.3-132.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/yum-3.4.3-132.fc20

Comment 9 Fedora Update System 2014-01-22 11:08:56 UTC
yum-3.4.3-132.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/yum-3.4.3-132.fc19

Comment 10 Fedora Update System 2014-01-23 11:09:46 UTC
yum-3.4.3-132.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2014-02-06 03:52:59 UTC
yum-3.4.3-132.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.