Bug 1361617 - [RFE] repoquery should support a "what-build-requires" query
Summary: [RFE] repoquery should support a "what-build-requires" query
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf-plugins-core
Version: rawhide
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1465399
TreeView+ depends on / blocked
 
Reported: 2016-07-29 14:18 UTC by Ondřej Lysoněk
Modified: 2018-11-22 18:40 UTC (History)
10 users (show)

Fixed In Version: dnf-4.0.4
Clone Of:
: 1465399 (view as bug list)
Environment:
Last Closed: 2018-11-22 18:40:07 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1465408 0 unspecified CLOSED [RFE] repoquery should support a query Exclusivearch and ExcludeArch tag 2023-08-22 12:56:59 UTC

Internal Links: 1465408

Description Ondřej Lysoněk 2016-07-29 14:18:09 UTC
Description of problem:
It would be nice to have an option for dnf repoquery, that would list all packages which require a given package during build.

Comment 1 Jaroslav Škarvada 2016-07-29 14:20:58 UTC
I.e. alias for:
 dnf repoquery --disablerepo=\* --enablerepo=SRC --arch=src --whatrequires PKG

Comment 2 Jaroslav Škarvada 2016-07-29 14:23:18 UTC
I could be called --whatbuildrequires, etc.

The above example is not straightforward and it is not easy to find it. At least it should be present in the dnf.plugin.repoquery manual page examples.

Comment 3 Igor Gnatenko 2016-07-29 14:25:35 UTC
$ dnf repoquery --repo=fedora-rawhide --arch src --whatrequires PKG

in DNF 2.0, but agree that it should be documented.

Comment 4 Tomas Orsava 2017-01-25 16:34:21 UTC
Update, this works on dnf 1.1.10:

$ dnf repoquery --disablerepo=\* --enablerepo=rawhide-source --arch=src --whatrequires PKG

Comment 5 Sergio Basto 2017-03-18 19:43:43 UTC
and about query Exclusivearch tag ?

Comment 6 Orion Poplawski 2017-08-11 15:12:06 UTC
# dnf repoquery --disablerepo=\* --enablerepo=rawhide-source --arch=src --whatrequires python3-pkgversion-macros
Traceback (most recent call last):
  File "/usr/bin/dnf", line 58, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 179, in user_main
    errcode = main(args)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 64, in main
    return _main(base, args, cli_class, option_parser_class)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 95, in _main
    cli.configure(list(map(ucd, args)), option_parser())
  File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 878, in configure
    self.base.conf._configure_from_options(opts)
  File "/usr/lib/python3.6/site-packages/dnf/conf/config.py", line 843, in _configure_from_options
    setattr(self, name, value)
  File "/usr/lib/python3.6/site-packages/dnf/conf/config.py", line 908, in arch
    assert(val in dnf.rpm._BASEARCH_MAP.keys())
AssertionError

dnf-2.6.2-3.fc27.noarch

Comment 7 Jaroslav Mracek 2017-08-11 19:35:27 UTC
The problem presented in Comment 6 was solved in dnf-2.6.3-1 .

Comment 8 Jaroslav Mracek 2018-06-18 20:06:45 UTC
I created a patch with enhanced documentation: https://github.com/rpm-software-management/dnf/pull/1113


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