Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Better help organization for
--querytags
and--queryinfo
#1627Better help organization for
--querytags
and--queryinfo
#1627Changes from all commits
c1aedfe
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I'm fine personally with removing this, but I'd like a second opinion just to make sure someone doesn't find it actually userful, @dmach @j-mracek @m-blaha, do you agree with removing this line?
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.
Also if you wanna do this, could you also remove at least the leading line-break (and ideally the trailing one too) from the
QUERY_TAGS
variable? Now it prints an empty line before and after the list of tags which are superfluous.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.
Removed spaces. Although I would also split
reponame (repoid)
into separate items, or removedreponame
completely. Then it will be relatively easy to parse the output with something likebash
.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 appears
reponame
doesn't stand for the name, it's the id, same asrepoid
. An obvious error? I'm not against just removing it, but I'm not sure we can do that. I'm sure @j-mracek will know more though?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.
I am sorry, but I do not understanding your question. Reponame as an attribute of package class. --qf is capable to return any attribute of Package class.
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.
The question is whether we should remove
reponame
from the list, because it contains the ID, not the name. And since there already isrepoid
, it is redundant in addition to wrong.I'd assume this is some sort of legacy API attribute, since it's called "name" and contains the ID. FTR the excerpt is from the API documentation: https://github.com/rpm-software-management/dnf/blob/master/doc/api_package.rst. Interestingly
repoid
isn't listed there and also no way to get the actual repo name.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.
I don't see any benefit in removal of
print(_('Available query-tags: use --queryformat ".. %{tag} .."'))
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.
@j-mracek it is to make the output suitable for scripting. For example https://github.com/rpm-software-management/libdnf/issues/720#issuecomment-631625069
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.
Although I'm not entirely sure what would you parse the list for (ultimately you have to know the semantics of each field so you need to have them listed somewhere in your code anyway), I find it reasonable to remove it...