-
Notifications
You must be signed in to change notification settings - Fork 97
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
Improve detection speed for LSB based systems #28
Conversation
The new code avoids calling the external lsb_release binary and reads the /etc/lsb-release issue file instead.
Code and logic looks fine, but we should test it on lucid and quantal to ensure that nothing is different about the contents in |
My work computer is quantal, and my file server at home is lucid. Both have the appropriate content in |
Ok, sounds good to me then, @tfoote you want to take a look too? |
It looks like there's an lsb_release module so we don't have to do our own parsing:
|
According to https://bugs.launchpad.net/rester/+bug/789736 we cannot assume that the lsb_release module is available on all systems. They suggest the platform module instead. |
I just ran into that too. It does appear the platform module does what we need and is more standard. |
I tested the platform module code with Ubuntu and Debian, but I have no access to Linux Mint. As you can see, I had to change the Debian identifier to lower-case, so it might break on Linux Mint as well. |
Any chance a new version of rospkg with this fix could get released? |
The new code avoids calling the external lsb_release
binary and reads the /etc/lsb-release issue file instead.
The old code called lsb_release quite excessively:
On Ubuntu, this totals to 7 popen calls just to detect the OS.