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

Limit queries to nevra forms when provided by command #2098

Merged
merged 2 commits into from
May 23, 2024

Conversation

j-mracek
Copy link
Contributor

@j-mracek j-mracek commented May 23, 2024

Command dnf install-n <provide> does not install only according to package mame but still search in provides. The patch limits searrch only to NEVRA forms for install, remove, autoremove, and repoquery commands.

Resolves partially: https://issues.redhat.com/browse/RHEL-5747

CI: rpm-software-management/ci-dnf-stack#1509

Command `dnf install-n <provide>` does not install only according
to package mame but still search in provides. The patch limits
searrch only to NEVRA forms for install, remove, autoremove,
and repoquery commands.

Resolves partially: https://issues.redhat.com/browse/RHEL-5747
@@ -461,9 +461,10 @@ def run(self):
if self.opts.key:
remote_packages = self._add_add_remote_packages()

kwark = {}
kwark = {'with_provides': False}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably enhance also repoquery documentation a bit to prevent future misunderstandings. It correctly states that query keys are <package-file-spec>. But it also says:

<package-file-spec>
              Package specification in the  NEVRA  format
              (name[-[epoch:]version[-re‐lease]][.arch]),  a  package  provide
              or a file provide. See Specifying Packages.

I think we should remove the a package provide part from it since repoquery command has never searched in provides.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Repoquery command never matched spec with provides.
Copy link
Member

@m-blaha m-blaha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@m-blaha m-blaha merged commit f211e1a into rpm-software-management:master May 23, 2024
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants