Module: OS::Linux::Glibc Private
- Defined in:
- os/linux/glibc.rb
Overview
This module is part of a private API. This module may only be used in the Homebrew/brew repository. Third parties should avoid using this module if possible, as it may be removed or changed without warning.
Helper functions for querying glibc
information.
Class Method Summary collapse
- .below_ci_version? ⇒ Boolean private
- .below_minimum_version? ⇒ Boolean private
- .minimum_version ⇒ Version private
- .system_version ⇒ Version private
- .version ⇒ Version private
Class Method Details
.below_ci_version? ⇒ Boolean
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
45 46 47 |
# File 'os/linux/glibc.rb', line 45 def below_ci_version? system_version < LINUX_GLIBC_CI_VERSION end |
.below_minimum_version? ⇒ Boolean
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
40 41 42 |
# File 'os/linux/glibc.rb', line 40 def below_minimum_version? system_version < minimum_version end |
.minimum_version ⇒ Version
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
35 36 37 |
# File 'os/linux/glibc.rb', line 35 def minimum_version Version.new(ENV.fetch("HOMEBREW_LINUX_MINIMUM_GLIBC_VERSION")) end |
.system_version ⇒ Version
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
11 12 13 14 15 16 17 18 19 20 |
# File 'os/linux/glibc.rb', line 11 def system_version @system_version ||= begin version = Utils.popen_read("/usr/bin/ldd", "--version")[/ (\d+\.\d+)/, 1] if version Version.new version else Version::NULL end end end |
.version ⇒ Version
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
23 24 25 26 27 28 29 30 31 32 |
# File 'os/linux/glibc.rb', line 23 def version @version ||= begin version = Utils.popen_read(HOMEBREW_PREFIX/"opt/glibc/bin/ldd", "--version")[/ (\d+\.\d+)/, 1] if version Version.new version else system_version end end end |