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
Add option --deplist for repoquery #621
Conversation
d1efaa4
to
40f6de1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Waiting for tests to be merged (rpm-software-management/ci-dnf-stack#183). |
@@ -90,7 +90,7 @@ class RepoQueryCommand(commands.Command): | |||
"""A class containing methods needed by the cli to execute the repoquery command. | |||
""" | |||
|
|||
aliases = ('repoquery',) | |||
aliases = ('repoquery', 'deplist') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should not this belong to yum-dnf wrapper @jsilhan?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jsilhan repoquery (yum-utils) do not have option --deplist.
The solution here allows hidden compatibility with "yum deplist", but it has all functionality of repoquery therefore it allows all options for package filtrating, but no additional lines of code were required. Somehow the new option for repoguery sounds better to me (with more functionality) than new command (require more code). The solution still keeps 100% compatibility with 'yum deplist'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mhatina Please the PR requires your opinion from jsilhan question.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jsilhan It does now. (Sorry for late response, I have to modify my filters in gmail)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -120,6 +120,8 @@ def set_argparser(parser): | |||
help=_("check non-explicit dependencies (files and Provides); default")) | |||
whatrequiresform.add_argument("--exactdeps", action="store_true", | |||
help=_('check dependencies exactly as given, opposite of --alldeps')) | |||
parser.add_argument('--deplist', action='store_true', | |||
help=_("list of all dependencies and what packages it provides")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[flake8]
- [E501] line too long (93 > 79 characters)
1827871
to
393b041
Compare
=========================== | ||
No ``deplist`` command | ||
=========================== | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I am not sure if it should be deleted. Command yum deplist
will works but not dnf deplist
. For dnf you have to use dnf repoquery --deplist
. @jsilhan Is that what was supposed to? And how to handle descriptions in cli_vs_yum.rst ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FTR cli_vs_yum
is documentation of differences of upstream DNF project and yum (yum-deprecated). So in this case it should be there as a change although there should be some .. seealso::
mentioning the command exists in yum-dnf when /usr/bin/yum
is executed.
test this please |
@dnf-bot retest this please |
test this please |
1 similar comment
test this please |
📌 Commit de287cf has been approved by |
Closes: #621 Approved by: mhatina
Closes: #621 Approved by: mhatina
☀️ Test successful - status-jenkins |
""" | ||
|
||
aliases = ('deplist',) | ||
summary = _("List a package's dependencies") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not grammatical. Should be "List packages' dependencies".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is grammatically correct. It just lists dependencies of one package and what you suggested lists dependencies of more packages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Singular: "List package's dependencies", plural: "List packages' dependencies". Pick one.
|
||
class DeplistCommand(RepoQueryCommand): | ||
""" | ||
some comment about command |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I missed that in review.
@@ -120,6 +120,8 @@ def set_argparser(parser): | |||
help=_("check non-explicit dependencies (files and Provides); default")) | |||
whatrequiresform.add_argument("--exactdeps", action="store_true", | |||
help=_('check dependencies exactly as given, opposite of --alldeps')) | |||
parser.add_argument('--deplist', action='store_true', help=_( | |||
"list of all dependencies and what packages it provides")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence makes not sense ;(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does make sense. It lists all dependencies and for each dependency lists packages that provide given dependency.
Maybe it could be changed, so it is easily understandable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"It" refers to "list" ("list" is the subject of the sentence). But a "list" does not "provide" packages. I'm not sure what exactly the sentence was supposed to convey, so I don't know how to fix it, but it needs to be changed.
@j-mracek, take a second look please. |
@dnf-bot r+ |
📌 Commit 22a6c17 has been approved by |
Closes: #621 Approved by: mhatina
💔 Test failed - status-jenkins |
@dnf-bot retry |
Closes: #621 Approved by: mhatina
💔 Test failed - status-jenkins |
@@ -121,7 +121,7 @@ def set_argparser(parser): | |||
whatrequiresform.add_argument("--exactdeps", action="store_true", | |||
help=_('check dependencies exactly as given, opposite of --alldeps')) | |||
parser.add_argument('--deplist', action='store_true', help=_( | |||
"list of all dependencies and what packages it provides")) | |||
"show a list of all dependencies and what packages provide it")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This version is better, thanks. "provide them" would be better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@keszybz Thanks for corrections, I just overlooked the text (too much inspiration from yum)
@dnf-bot r+ |
📌 Commit e53c234 has been approved by |
☀️ Test successful - status-jenkins |
It also allows to run it as command 'dnf deplist ' - yum compatibility.
I will provide test for CI-dnf-stack