Mach linux_distribution and VERSION_ID bug
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
People
(Reporter: rafail.giavrimis, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0
Steps to reproduce:
I tried to run ./mach bootstrap under Manjaro Linux under Python 2.7.16.
Actual results:
./mach bootstrap
Error running mach:
['bootstrap']
The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.
You can invoke |./mach busted| to check if this issue is already on file. If it
isn't, please use |./mach busted file| to report it. If |./mach busted| is
misbehaving, you can also inspect the dependencies of bug 1543241.
If filing a bug, please include the full output of mach, including this error
message.
The details of the failure are as follows:
KeyError: u'VERSION_ID'
File "/home/raf/firefox/src/mozilla-central/python/mozboot/mozboot/mach_commands.py", line 42, in bootstraphttps://www.linux.org/docs/man5/os-release.html
mach_context=self._context,
File "/home/raf/firefox/src/mozilla-central/python/mozboot/mozboot/bootstrap.py", line 261, in init
version = d["VERSION_ID"]
This happened, because arch is not one of the supported distros of platform.linux_distribution(), so it returns ('', '', '') and the script continues into the following part of code (line 254):
if distro == '' and os.path.exists('/etc/os-release'):
d = {}
for line in open('/etc/os-release'):
k, v = line.rstrip().split("=")
d[k] = v.strip('"')
distro = d["NAME"]
version = d["VERSION_ID"]
dist_id = d["ID"]
Although this fails, because Manjaro does not have a Version ID, which is allowed as it is an optional field (https://www.linux.org/docs/man5/os-release.html) and
it crashed on line 260.
I would like to fix this as my first bug.
Expected results:
It should have parsed the right distro information and complete the script.
| Reporter | ||
Updated•6 years ago
|
| Reporter | ||
Comment 1•6 years ago
|
||
(In reply to rafail.giavrimis from comment #0)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0
Steps to reproduce:
I tried to run ./mach bootstrap under Manjaro Linux under Python 2.7.16.
Actual results:
./mach bootstrap
Error running mach:
['bootstrap']The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.
You can invoke |./mach busted| to check if this issue is already on file. If it
isn't, please use |./mach busted file| to report it. If |./mach busted| is
misbehaving, you can also inspect the dependencies of bug 1543241.If filing a bug, please include the full output of mach, including this error
message.The details of the failure are as follows:
KeyError: u'VERSION_ID'
File "/home/raf/firefox/src/mozilla-central/python/mozboot/mozboot/mach_commands.py", line 42, in bootstraphttps://www.linux.org/docs/man5/os-release.html
mach_context=self._context,
File "/home/raf/firefox/src/mozilla-central/python/mozboot/mozboot/bootstrap.py", line 261, in init
version = d["VERSION_ID"]This happened, because arch is not one of the supported distros of platform.linux_distribution(), so it returns ('', '', '') and the script continues into the following part of code (line 254):
if distro == '' and os.path.exists('/etc/os-release'): d = {} for line in open('/etc/os-release'): k, v = line.rstrip().split("=") d[k] = v.strip('"') distro = d["NAME"] version = d["VERSION_ID"] dist_id = d["ID"]Although this fails, because Manjaro does not have a Version ID, which is allowed as it is an optional field (https://www.linux.org/docs/man5/os-release.html) and
it crashed on line 260.
I would like to fix this as my first bug.Expected results:
It should have parsed the right distro information and complete the script.
Updated•3 years ago
|
Description
•