Bug 1443467

Summary: There's no way to override repoquery's basearch
Product: [Fedora] Fedora Reporter: Petr Šabata <psabata>
Component: dnfAssignee: rpm-software-management
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 26CC: jmracek, packaging-team-maint, rpm-software-management, vmukhame
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-27 12:23:57 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:

Description Petr Šabata 2017-04-19 09:58:34 UTC
Description of problem:
Running certain repoquery queries on repositories with packages with arches differing from your basearch yields no results even though it, IMO, should.

Example:
% dnf repoquery --repofrompath='test,http://secondary.fedoraproject.org/pub/fedora-secondary/releases/test/26_Alpha/Everything/aarch64/os/' --repo=test --provides zlib            
Added test repo from http://secondary.fedoraproject.org/pub/fedora-secondary/releases/test/26_Alpha/Everything/aarch64/os/
Last metadata expiration check: 0:15:27 ago on Wed Apr 19 11:24:57 2017 CEST.
libz.so.1()(64bit)
(...)
% 
% dnf repoquery --repofrompath='test,http://secondary.fedoraproject.org/pub/fedora-secondary/releases/test/26_Alpha/Everything/aarch64/os/' --repo=test --whatprovides 'libz.so.1()(64bit)'
Added test repo from http://secondary.fedoraproject.org/pub/fedora-secondary/releases/test/26_Alpha/Everything/aarch64/os/
Last metadata expiration check: 0:15:50 ago on Wed Apr 19 11:24:57 2017 CEST.
(...nothing...)

As far as I can tell, this cannot be overridden in any way.  This affects all kinda of queries, including the very useful --requires --resolve combo.

Bug #1438304 is somewhat related but it's about the Python API.

Version-Release number of selected component (if applicable):
dnf-2.3.0-1.fc26.noarch

How reproducible:
Always

Comment 1 Petr Šabata 2017-04-19 10:04:36 UTC
Note yum-utils repoquery works fine if you specify the desired arches with the --arch option.  It has no effect in dnf repoquery.

% repoquery --repofrompath='test,http://secondary.fedoraproject.org/pub/fedora-secondary/releases/test/26_Alpha/Everything/aarch64/os/' --repoid=test --arch aarch64,noarch --whatprovides 'libz.so.1()(64bit)'

Yum-utils package has been deprecated, use dnf instead.
See 'man yum2dnf' for more information.


zlib-0:1.2.11-2.fc26.aarch64
% dnf repoquery --repofrompath='test,http://secondary.fedoraproject.org/pub/fedora-secondary/releases/test/26_Alpha/Everything/aarch64/os/' --repo=test --arch aarch64,noarch --whatprovides 'libz.so.1()(64bit)' 
Added test repo from http://secondary.fedoraproject.org/pub/fedora-secondary/releases/test/26_Alpha/Everything/aarch64/os/
Last metadata expiration check: 0:39:14 ago on Wed Apr 19 11:24:57 2017 CEST.
(...nothing)

Comment 3 Jaroslav Mracek 2017-07-27 12:23:57 UTC
I think that the functionality requested here was provided by pull-request https://github.com/rpm-software-management/dnf/pull/866 that is part of dnf-2.6.2-1 .