This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 790715 - contra-intuitive and likely broken behavior of rpmquery --archlist
contra-intuitive and likely broken behavior of rpmquery --archlist
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: yum-utils (Show other bugs)
19
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-15 04:15 EST by Kamil Dudka
Modified: 2015-02-17 09:06 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-02-17 09:06:44 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Kamil Dudka 2012-02-15 04:15:04 EST
Description of problem:

The man page for rpmquery --archlist says:

    Limit the query to packages of given architecture(s).

This means that, given the option, one should get fewer results than without the option.  However, I am observing the exactly opposite behavior.


Version-Release number of selected component (if applicable):
yum-utils-1.1.31-4.fc17.noarch


How reproducible:
100 %


Steps to Reproduce:
1. repoquery --repoid=rawhide-source --whatrequires gcc-plugin-devel
2. repoquery --repoid=rawhide-source --whatrequires gcc-plugin-devel --archlist=src


Actual results:
1. gives me an empty list
2. gives me gcc-python-plugin-0:0.9-1.fc17.src


Expected results:
2. should give less-or-equal items than 1. according to docs.
Comment 1 Panu Matilainen 2012-02-15 04:34:12 EST
For "real" architectures, --archlist should behave like you expect it to, but source packages are a bit special as they're never included in queries unless explicitly enabled with --archlist.
Comment 2 Kamil Dudka 2012-02-15 04:54:26 EST
This means the --archlist option is used for unrelated and undocumented purposes.

Note that source repositories are not enabled by default, so one would think that enabling them is enough to make repoquery use them.  What is actually the purpose of this undocumented magic?
Comment 3 Panu Matilainen 2012-02-15 05:30:07 EST
yum, repoquery etc have no idea whether a repository is "source" repository or not (and no, it's not really appropriate to decide by repository name), and in fact its possible to have both source- and binary packages in a single repo.

It's been a while, but IIRC --archlist override also allows showing binary packages that aren't considered compatible with the current arch which it normally wouldn't show, and the .src "arch" is just a special case of that. So your expectation of "2. should give less-or-equal items than 1." is not really valid generally.

I dont see anything explicit about "should always give less results" in the man page, apart from the term "limit" which can be interpreted that way. Probably just a matter of clarifying the behavior.
Comment 4 Kamil Dudka 2012-02-15 05:48:30 EST
Although I am not a native speaker, this definition sounds clear to me:

http://dictionary.cambridge.org/dictionary/british/limit_2
Comment 5 Panu Matilainen 2012-02-15 06:03:21 EST
Yes, and --archlist does fit the definition: it will not output packages with architectures outside the ones specified, ie it limits the output to packages matching the specified arch(s). The confusion comes from the default, implicit archlist which you never see (ie exclude .src and non-compatible archs), and assuming --archlist *further* limits the results.

Mind you I dont disagree at all with it being somewhat non-obvious, especially the .src support in repoquery and friends has always been a bit of a hack with strange quirks.
Comment 6 Kamil Dudka 2012-02-15 06:28:09 EST
Nope, "to limit" means less-or-equal than default unless you specify what the limit applies to, or what the default actually is.  Querying tools (like GNU find) usually defaults to match all results when no options are given.

If you insist on the behavior being correct (and enough user-friendly), the documentation needs to be clarified.  Please have a look at the following wording, whether it describes the current behavior:

"Limit the query to packages of given architecture(s).  If this option is not used, it defaults to exclude .src and non-compatible architectures.  By using this option, you override the default, which allows you to query source repositories in particular."

The above should probably appear not only in the man page, but also in the output repoquery --help (perhaps in a compressed form?).  The current documentation is actually worse than no documentation.
Comment 7 Fedora End Of Life 2013-04-03 13:38:14 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19
Comment 8 Fedora End Of Life 2015-01-09 12:00:28 EST
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 9 Fedora End Of Life 2015-02-17 09:06:44 EST
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

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