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

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.

Returns:

  • (Boolean)
 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.

Returns:

  • (Boolean)
 42 43 44
# File 'os/linux/glibc.rb', line 42 def below_minimum_version? system_version < minimum_version end

.minimum_versionVersion

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.

Returns:

 37 38 39
# File 'os/linux/glibc.rb', line 37 def minimum_version Version.new(ENV.fetch("HOMEBREW_LINUX_MINIMUM_GLIBC_VERSION")) end

.system_versionVersion

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.

Returns:

 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

.versionVersion

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.

Returns:

 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