mach bootstrap on Fedora 29 fails to install mercurial
Categories
(Firefox Build System :: Bootstrap Configuration, defect)
Tracking
(firefox73 fixed)
Tracking | Status | |
---|---|---|
firefox73 | --- | fixed |
People
(Reporter: heycam, Assigned: kuleshovmail)
Details
Attachments
(2 files)
503 bytes,
patch
|
Details | Diff | Splinter Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
Part way through the mach bootstrap process on a fresh Fedora 29 installation, it failed to install mercurial:
<<<
Could not find Mercurial (hg) in the current shell's path. Try starting a new
shell and running the bootstrapper again.
You do not have Mercurial installed
Executing as root: sudo dnf update mercurial
Last metadata expiration check: 0:06:49 ago on Thu 13 Dec 2018 15:22:42 AEDT.
Package mercurial available, but not installed.
No match for argument: mercurial
Error: No packages marked for upgrade.
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 should consider filing a bug for this issue.
If filing a bug, please include the full output of mach, including this error
message.
The details of the failure are as follows:
CalledProcessError: Command '[u'sudo', u'dnf', u'update', 'mercurial']' returned non-zero exit status 1
File "/home/cam/z/central/python/mozboot/mozboot/mach_commands.py", line 43, in bootstrap
bootstrapper.bootstrap()
File "/home/cam/z/central/python/mozboot/mozboot/bootstrap.py", line 438, in bootstrap
hg_installed, hg_modern = self.instance.ensure_mercurial_modern()
File "/home/cam/z/central/python/mozboot/mozboot/base.py", line 542, in ensure_mercurial_modern
if self.upgrade_mercurial(version) is False:
File "/home/cam/z/central/python/mozboot/mozboot/centosfedora.py", line 136, in upgrade_mercurial
self.dnf_update('mercurial')
File "/home/cam/z/central/python/mozboot/mozboot/base.py", line 374, in dnf_update
self.run_as_root(command)
File "/home/cam/z/central/python/mozboot/mozboot/base.py", line 338, in run_as_root
subprocess.check_call(command, stdin=sys.stdin)
File "/usr/lib64/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
>>>
Comment 1•5 years ago
•
|
||
This appears to be a mismatch between what the parent mozboot.base.BaseBootstrapper
class and the CentOSFedoraBootstrapper
subclass assume the upgrade_mercurial()
method's responsibilities are.
Looking at "python/mozboot/mozboot/base.py", line 542, in ensure_mercurial_modern()
: I'd guess the method assumes that the upgrade_mercurial()
method not only updates Mercurial but also installs Mercurial if it is missing. It calls the upgrade_mercurial()
method regardless of whether Mercurial is already installed and regardless of how it was installed.
The overridden method in CentOSFedoraBootstrapper
always runs dnf update mercurial
. It's assuming that Mercurial is already present and was installed via the package manager. It fails if neither of those are true, causing the error.
Assignee | ||
Comment 2•4 years ago
|
||
Fix Firefox bootstrap on Centos/Fedora
Assignee | ||
Comment 3•4 years ago
|
||
Comment on attachment 9113171 [details] [diff] [review] replace dnf update with dnf install as other distro do it >diff --git a/python/mozboot/mozboot/centosfedora.py b/python/mozboot/mozboot/centosfedora.py >index a8b4c86a42ec..18adee32a7b1 100644 >--- a/python/mozboot/mozboot/centosfedora.py >+++ b/python/mozboot/mozboot/centosfedora.py >@@ -165,4 +165,4 @@ class CentOSFedoraBootstrapper(NasmInstall, NodeInstall, StyloInstall, > self.suggest_mobile_android_mozconfig(artifact_mode=True) > > def upgrade_mercurial(self, current): >- self.dnf_update('mercurial') >+ self.dnf_install('mercurial')
Comment 4•4 years ago
|
||
Please publish the patch on phabricator
https://firefox-source-docs.mozilla.org/tools/docs/contribute/how_to_contribute_firefox.html
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 5•4 years ago
|
||
If Mercurial (hg) is not installed on a Centos/Fedora system, execution
of:
$ ./mach bootstrap
will be failed as the bootstrap script tries to execute:
dnf update mercurial
This commit replaces 'dnf update' with 'dnf install' command
to install but not upgrade mercurial version.
Updated•4 years ago
|
Pushed by nfroyd@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/debcd50d8712 fix mach bootstrap on Fedora when mercurial is not installed r=froydnj
Comment 7•4 years ago
|
||
Comment on attachment 9113171 [details] [diff] [review] replace dnf update with dnf install as other distro do it Review of attachment 9113171 [details] [diff] [review]: ----------------------------------------------------------------- It looks like this got moved to phabricator and already reviewed there.
Comment 8•4 years ago
|
||
bugherder |
Description
•