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.
47 48 49 |
# File 'os/linux/glibc.rb', line 47 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.
42 43 44 |
# File 'os/linux/glibc.rb', line 42 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.
37 38 39 |
# File 'os/linux/glibc.rb', line 37 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 21 |
# File 'os/linux/glibc.rb', line 11 def system_version @system_version ||= T.let(nil, T.nilable(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.
24 25 26 27 28 29 30 31 32 33 34 |
# File 'os/linux/glibc.rb', line 24 def version @version ||= T.let(nil, T.nilable(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 |