mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-19 02:44:17 +03:00
29 lines
845 B
Diff
29 lines
845 B
Diff
|
diff --git a/configure.py b/configure.py
|
||
|
index 25ca951ac..454140420 100755
|
||
|
--- a/configure.py
|
||
|
+++ b/configure.py
|
||
|
@@ -36,13 +36,16 @@ tempfile.tempdir = "./build/tmp"
|
||
|
|
||
|
configure_args = str.join(' ', [shlex.quote(x) for x in sys.argv[1:]])
|
||
|
|
||
|
-for line in open('/etc/os-release'):
|
||
|
- key, _, value = line.partition('=')
|
||
|
- value = value.strip().strip('"')
|
||
|
- if key == 'ID':
|
||
|
- os_ids = [value]
|
||
|
- if key == 'ID_LIKE':
|
||
|
- os_ids += value.split(' ')
|
||
|
+try:
|
||
|
+ for line in open('/etc/os-release'):
|
||
|
+ key, _, value = line.partition('=')
|
||
|
+ value = value.strip().strip('"')
|
||
|
+ if key == 'ID':
|
||
|
+ os_ids = [value]
|
||
|
+ if key == 'ID_LIKE':
|
||
|
+ os_ids += value.split(' ')
|
||
|
+except FileNotFoundError:
|
||
|
+ os_ids = ["linux"]
|
||
|
|
||
|
|
||
|
# distribution "internationalization", converting package names.
|