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

Fix package count for openSUSE. 3.7 #17

Merged
merged 2 commits into from
Mar 19, 2023
Merged

Fix package count for openSUSE. 3.7 #17

merged 2 commits into from
Mar 19, 2023

Conversation

mutageneral
Copy link
Contributor

@mutageneral mutageneral commented Mar 18, 2023

For some reason, for the package count for OS "opensuse" is set to "packages_opensuse", but that function does not exist, resulting in the error ./disfetch: 262: packages_opensuse: not found and no package count info on the fetch.

The existing functions that are compatible are "packages_rpm" and "packages_zypper". I used hyperfine to benchmark both, and using rpm directly is faster than using zypper.
image

This simple pull request sets the package count grabbing method of OS "opensuse" to "packages_rpm".

Set the package count grabbing method to "packages_rpm" for openSUSE. It is faster than "packages_zypper". It used to try to run a non-existing function and failed.
@mutageneral mutageneral changed the title Set the package count grabbing method to "packages_rpm" for openSUSE Fix package count for openSUSE Mar 18, 2023
@mutageneral
Copy link
Contributor Author

mutageneral commented Mar 18, 2023

Note, you could also remove the zypper package count retrieval method line, as my benchmarking shows it is useless, because rpm is faster and will always be available when zypper is. Tell me if you want me to add that.

@mutageneral
Copy link
Contributor Author

mutageneral commented Mar 19, 2023

Oops, I just realized all distro that use packages_rpm are on a single line and I modified the opensuse line instead of moving opensuse to the line for packages_rpm.

@q60 q60 changed the title Fix package count for openSUSE Fix package count for openSUSE. 3.7 Mar 19, 2023
@q60 q60 closed this Mar 19, 2023
@q60 q60 reopened this Mar 19, 2023
@q60 q60 merged commit 932b053 into q60:main Mar 19, 2023
@q60
Copy link
Owner

q60 commented Mar 19, 2023

much thanks for your contribution

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