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 -Qs for rpm (yum & dnf) #74

Merged
merged 2 commits into from May 4, 2016
Merged

Implement -Qs for rpm (yum & dnf) #74

merged 2 commits into from May 4, 2016

Conversation

sionleroux
Copy link
Collaborator

Based on the Pacman Rosetta Stone https://wiki.archlinux.org/index.php/Pacman/Rosetta

To mimic pacman's behaviour, this pads the search string with asterisks so that rpm will return more than just whole-word matches.
Tested on Centos 6 and works as expected.

I also ticked the Yum/Qs field with y in the README.
Just let me know if there's anything I missed.

To mimic pacman's behaviour, this pads the search string with asterisks
so that rpm will return more than just whole-word matches.

README updated appropriately.
@NgoHuy
Copy link
Collaborator

NgoHuy commented Apr 28, 2016

I just test with fedora 23, it worked. And I see this feature is available for dnf too, can you add for dnf with new commit :) ?

@sionleroux
Copy link
Collaborator Author

Interesting. To be honest I think this is just a naming issue and it's odd because in fact neither yum nor dnf seem to provide the functionality of pacman -Qs, instead for both of them this task is left up to rpm. Anyway, I will copy-and-paste this for dnf.

This function is a copy of the -Qs implementation for yum, because in
fact neither yum nor dnf provide this functionality, instead it is done
using rpm.

README updated appropriately.
@sionleroux sionleroux changed the title Implement -Qs for rpm (yum) Implement -Qs for rpm (yum & dnf) Apr 28, 2016
@icy
Copy link
Owner

icy commented Apr 29, 2016

Thanks for your contribution, @sinisterstuf . I will take a look at this at the weekend.

Thank you @NgoHuy , too.

@icy icy merged commit 92fba8e into icy:ng May 4, 2016
@icy
Copy link
Owner

icy commented May 4, 2016

FIXME: the use of "*$@*" is quite strange. This may prevent users from providing more options. But let's see this a featured-bug ;)

@sionleroux sionleroux deleted the yum/Qs branch May 4, 2016 15:53
@sionleroux
Copy link
Collaborator Author

sionleroux commented May 4, 2016

That's a valid point, $@ was copied from the existing commands, but in reality we want '*search-term*' where search-term is a single WORD (package names do not contain more than one WORD as far as I know). Perhaps search-term could even be the last item from $@? Or perhaps that's complicated.

Either way, what options (not provided by pacapt) would the user provide? Yum-specific options? In this case they should probably use yum. This is not yet a use case for me, but I suppose it's worth revisiting when somebody needs to be able to provide more options.

EDIT: thanks for the merge! 😄

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

3 participants