Lines Matching full:release
6 """Get all key-value pairs from /etc/os-release as a dict"""
10 if os.path.exists('/etc/os-release'):
11 with open('/etc/os-release') as f:
21 """ Populate a dict with pertinent values from /etc/os-release """
41 'Release': 'DISTRIB_RELEASE'}
61 """ Try to gather release information manually when other methods fail """
64 if os.path.exists('/etc/lsb-release'):
66 with open('/etc/lsb-release') as f:
70 elif os.path.exists('/etc/redhat-release'):
72 with open('/etc/redhat-release') as f:
75 match = re.match(r'(.*) release (.*) \((.*)\)', distro)
79 elif os.path.exists('/etc/SuSE-release'):
82 with open('/etc/SuSE-release') as f:
98 # Try /etc/os-release first, then the output of `lsb_release -ir` and
99 # finally fall back on parsing various release files in order to determine
108 release = distro_data.get('DISTRIB_RELEASE', '')
111 distro_id, release = adjust_hook(distro_id, release)
117 if release:
118 id_str = '{0}-{1}'.format(distro_id, release)