Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement additional repoquery options #122

Closed
55 of 58 tasks
Tracked by #429
kontura opened this issue Nov 7, 2022 · 10 comments
Closed
55 of 58 tasks
Tracked by #429

Implement additional repoquery options #122

kontura opened this issue Nov 7, 2022 · 10 comments
Assignees
Labels
Priority: HIGH RFE Request For Enhancement (as opposed to a bug) Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take
Milestone

Comments

@kontura
Copy link
Contributor

kontura commented Nov 7, 2022

The dnf4 repoquery command has a lot of options.

There are two categories:

Select Options

Together with the <package-file-spec> argument, control what packages are displayed in the output.

  • <package-file-spec>

  • -a, --all

    • Proposing to drop it (document as a change). It is a default dnf behavior and it was added as compatibility option with yum
  • --arch / --archlist

    • Please change other command that uses the same o similar options (even option can be the same, but schematic of arguments can be different) in DNF and unify it
  • --duplicates

  • Implement repoquery --unneeded option #454

  • --available

  • --disable-modular-filtering

  • --extras

  • -f <file>, --file <file>

  • --installed

  • --installonly

  • --latest-limit <number>

  • --recent

    • Priority low
  • --repo <repoid>

    • It is a general option. Investigate why it is explicitly mentioned in repoquery
    • [amatej] The best I can tell the option got imported together with repoquery command into dnf. Perhaps before when repoquery was separate the option was needed.
  • --upgrades

  • --userinstalled

  • --whatdepends <capability>[,<capability>...]

  • --whatconflicts <capability>[,<capability>...]

  • --whatenhances <capability>[,<capability>...]

  • --whatobsoletes <capability>[,<capability>...]

  • --whatprovides <capability>[,<capability>...]

  • --whatrecommends <capability>[,<capability>...]

  • --whatrequires <capability>[,<capability>...]

  • --whatsuggests <capability>[,<capability>...]

  • --whatsupplements <capability>[,<capability>...]

  • --alldeps

    • It is a default behavior of DNF therefore I propose to remove it (document the change). The reason of presence of the option -> the default was changed in history
  • --exactdeps

  • --srpm

    • Please verify that other commands use --srpm, or --source using the same principle

Formatting Options

Set what information is displayed about each package.

  • -i, --info #479
  • -l, --list
    • Proposing to rename to more appropriate --files
  • -s, --source
    • Please verify that other commands use --srpm, or --source using the same principle
  • --changelogs
  • --conflicts
  • --depends
  • --enhances
  • --location
  • --obsoletes
  • --provides
  • --recommends
  • --requires
  • --requires-pre
  • --suggests
  • --supplements
  • --nvr
    • Proposing to drop it (document as a change) (yum compatibility)
  • --nevra
    • Proposing to drop it (document as a change) (yum compatibility) - default behavior
  • --envra
    • Proposing to drop it (document as a change) (yum compatibility) - DNF is unable to parse such a spec
  • --qf , --queryformat <format>
    • Priority medium (required by fedora-review)

Additional options:

  • --querytags
  • --groupmember <package-spec> -> move to group command --contains-pkgs <pkg> option?
    • moving to group command is a good suggestion. Please document it to DNF to DNF5 changes

Additional tasks:

  • Add option conflicts (if/where needed)
  • Enable autocomplete
  • Add man pages/documentation
  • Enable CI tests

Options tracked in separate issues:

@kontura kontura self-assigned this Nov 7, 2022
@j-mracek j-mracek added this to the Fedora 39 milestone Nov 7, 2022
@j-mracek j-mracek added RFE Request For Enhancement (as opposed to a bug) ready for review Priority: HIGH labels Nov 14, 2022
kontura added a commit to kontura/dnf5 that referenced this issue Nov 28, 2022
kontura added a commit to kontura/dnf5 that referenced this issue Nov 28, 2022
kontura added a commit to kontura/dnf5 that referenced this issue Nov 28, 2022
kontura added a commit to kontura/dnf5 that referenced this issue Nov 29, 2022
j-mracek pushed a commit that referenced this issue Nov 29, 2022
Document several options as dropped.
For: #122
kontura added a commit to kontura/dnf5 that referenced this issue Nov 29, 2022
kontura added a commit to kontura/dnf5 that referenced this issue Nov 30, 2022
kontura added a commit to kontura/dnf5 that referenced this issue Nov 30, 2022
kontura added a commit to kontura/dnf5 that referenced this issue Nov 30, 2022
m-blaha pushed a commit that referenced this issue Nov 30, 2022
@glum23
Copy link
Contributor

glum23 commented Apr 25, 2023

While --qf / --queryformat is marked as implemented, it does not work as expected (namely in RHEL, dnf5-5.0.9-1.git.966.354f7b6.el9). --queryformat provides nothing while --qf is reported to be an unknown option. Comparison with dnf4 results on the same machine is provided:

# dnf5 repoquery --queryformat='%{name}-%{version}' bash
Updating and loading repositories:
Repositories loaded.
# dnf5 repoquery --qf='%{name}-%{version}' bash
Unknown argument "--qf=%{name}-%{version}" for command "repoquery". Add "--help" for more information about the arguments.
# dnf repoquery --queryformat='%{name}-%{version}' bash
Last metadata expiration check: 1:56:25 ago on Tue 25 Apr 2023 06:50:19 AM EDT.
bash-5.1.8
# dnf repoquery --qf='%{name}-%{version}' bash
Last metadata expiration check: 1:56:48 ago on Tue 25 Apr 2023 06:50:19 AM EDT.
bash-5.1.8

@kontura
Copy link
Contributor Author

kontura commented May 2, 2023

The alias for --qf is missing but the output should work.
Maybe the output is just overlooked, there was a change where dnf5 no longer automatically adds a new line at the end.
Can you try:

dnf5 repoquery --queryformat='%{name}-%{version}\n' bash

@glum23
Copy link
Contributor

glum23 commented May 3, 2023

@kontura, it's really strange, below is output from terminal (with intentionally deleted some of non-related parts). For the first time 'dnf5 repoquery' is called there's apparently no output related to queryformat, however, there is missing also 'Repositories loaded.' phrase. Every other call shows the requested output (either with \n or without it). Maybe there's some issue related to repos and the first call just fails to provide the whole output, so it's unrelated to repoquery subcommand itself.
dnf5-5.0.9-1.git.966.354f7b6.el9.x86_64

[root@<deleted> ~]# dnf5 repoquery --queryformat='%{name}-%{version}' bash
Updating and loading repositories:
 Beaker harness                         100% | 267.6 KiB/s |  26.8 KiB |  00m00s
 Beaker Client - RedHatEnterpriseLinux9 100% |  65.3 KiB/s |   5.8 KiB |  00m00s
<deleted part of repo list>
 rhel-SAP-debuginfo                     100% | 269.3 KiB/s |   3.8 KiB |  00m00s
 rhel-SAPHANA-debuginfo                 100% | 214.5 KiB/s |   3.4 KiB |  00m00s
[root@<deleted> ~]# dnf5 repoquery --queryformat='%{name}-%{version}\n' bash
Updating and loading repositories:
Repositories loaded.
bash-5.1.8
[root@<deleted> ~]# dnf5 repoquery --queryformat='%{name}-%{version}' bash
Updating and loading repositories:
Repositories loaded.
bash-5.1.8[root@<deleted> ~]# dnf5 clean all
Removed 88 files, 66 directories. 0 errors occurred.
[root@<deleted> ~]# dnf5 repoquery --queryformat='%{name}-%{version}' bash
Updating and loading repositories:
 Beaker harness                                        100% | 265.0 KiB/s |  26.8 KiB |  00m00s
 Beaker Client - RedHatEnterpriseLinux9                100% |  64.6 KiB/s |   5.8 KiB |  00m00s
<deleted part of repo list>
 rhel-NFV-debuginfo                                    100% | 193.2 KiB/s |   2.9 KiB |  00m00s
 rhel-SAPHANA                                          100% | 331.2 KiB/s |   6.6 KiB |  00m00s
Repositories loaded.
bash-5.1.8[root@<deleted> ~]#

@kontura
Copy link
Contributor Author

kontura commented May 6, 2023

@glum23 can I please ask you to file a separate bug about that?

@glum23
Copy link
Contributor

glum23 commented May 9, 2023

The bug can be reproduced only in rhel9, postponed until the next build of dnf5 for rhel9.

@davide125
Copy link

fedora-review is breaking in Rawhide because dnf repoquery -C isn't implemented.

@kontura
Copy link
Contributor Author

kontura commented Jun 22, 2023

fedora-review is breaking in Rawhide because dnf repoquery -C isn't implemented.

It is a general dnf option, tracked here: #191

@jan-kolarik
Copy link
Member

fedora-review is breaking in Rawhide because dnf repoquery -C isn't implemented.

I've added this request to the tracking issue here: #635.

@FrostyX
Copy link
Member

FrostyX commented Jul 25, 2023

fedora-review is breaking in Rawhide because dnf repoquery -C isn't implemented.

It is failing because of the missing --resolve parameter as well.

@j-mracek j-mracek added the Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take label Aug 29, 2023
@j-mracek
Copy link
Member

j-mracek commented Sep 25, 2023

I excluded remaining options into separate issue to allow testing of implemented features

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: HIGH RFE Request For Enhancement (as opposed to a bug) Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take
Projects
Archived in project
Development

No branches or pull requests

6 participants