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

Correct rpm -ql exit value when optional -p is omitted (RhBug:1680610) #641

Merged
merged 3 commits into from Mar 18, 2019

Conversation

pavlinamv
Copy link
Contributor

Additionally if a package query with the argument was successful, there
is no need to rpm query of the argument.

@pavlinamv
Copy link
Contributor Author

An additional commit is added for correcting -ql output for multiple rpm files if -p is omitted.
(Thus the PR does not exactly correspond to its name).

@pmatilai
Copy link
Member

  • Use rpmFileHasSuffix() instead of manual calculation (yes I know you're not adding the calculation, but might as well get rid of it while touching the code)
  • Pretty please, no numbered variables unless the number is a meaningful part of the of the name (eg in coordinates x1, y1, x2, y2 are meaningful). If you can come up with a name/abbreviation that's actually meaningful to the context, great. If not, "xx" is commonly used these sort of internal, temporary error codes.

@pavlinamv
Copy link
Contributor Author

I (hopefully) incorporated all comments from Florian and Panu. The line with a manual calculation is not a part of the 2 patches now. Thus I added the third patch to change it (on 2 places in the query file - to be consistent). If you think that the last commit should not be used, I am fine with it.

@pmatilai pmatilai merged commit df55e76 into rpm-software-management:master Mar 18, 2019
@pmatilai
Copy link
Member

Merged, thanks.

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.

None yet

2 participants