ankane / or-tools-ruby

Operations research tools for Ruby
Apache License 2.0
179 stars 25 forks source link

Dependency on lsb-core when installing the gem #27

Closed bhasto closed 2 years ago

bhasto commented 2 years ago

First of all, thanks for a great gem.

I’m running into some installation problems in environments where lsb-core package isn’t installed and thus the lsb_release command doesn’t work. For example, we don’t keep lsb-core in our base application images or in our base CI image because it has a lot of dependencies, some quite big (like python3).

I do have other possibilities (install the package despite its dependencies), download the binaries manually and build against that directory, but the convenience of binaries being downloaded automatically is great so I wanted to explore that path further first.

It looks like all the operating systems targeted in vendor.rb should support the /etc/os-release file required by systemd. To my best understanding, this is an actual standard and leveraging this file could potentially remove the dependency on lsb-core; it could be replaced by parsing a text file in pure Ruby.

Would it make sense to make such change?

ankane commented 2 years ago

Hey @bhasto, thanks for the suggestion! Makes sense to me. Can you try the latest version from GitHub?

bhasto commented 2 years ago

Works for me on Ubuntu 20.04 without lsb-core installed.

Thank you so much, that was blazing fast.

ankane commented 2 years ago

Great, just pushed a new release (0.6.1).