Closed Bug 1721538 Opened 3 years ago Closed 3 years ago

mach bootstrap failed with TypeError

Categories

(Firefox Build System :: Bootstrap Configuration, defect)

defect

Tracking

(firefox-esr78 unaffected, firefox90 unaffected, firefox91 unaffected, firefox92 fixed)

RESOLVED FIXED
92 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox90 --- unaffected
firefox91 --- unaffected
firefox92 --- fixed

People

(Reporter: leikao, Assigned: aryx)

References

(Regression)

Details

(Keywords: regression)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36

Steps to reproduce:

Build Firefox for Linux from bootstrap on a fresh linux box.

Actual results:

When I execute ./mach bootstrap, an error occurs:

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 bootstrap| 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:

TypeError: ensure_browser_packages() takes from 1 to 2 positional arguments but 3 were given

File "/home/justin/FirefoxCode/linux-pc/python/mozboot/mozboot/mach_commands.py", line 48, in bootstrap
bootstrapper.bootstrap(command_context.settings)
File "/home/justin/FirefoxCode/linux-pc/python/mozboot/mozboot/bootstrap.py", line 398, in bootstrap
self.maybe_install_private_packages_or_exit(
File "/home/justin/FirefoxCode/linux-pc/python/mozboot/mozboot/bootstrap.py", line 279, in maybe_install_private_packages_or_exit
getattr(self.instance, "ensure_%s_packages" % application)(#self.instance.artifact_mode)

Expected results:

./mach bootstrap executed success.

The Bugbug bot thinks this bug should belong to the 'Firefox Build System::Bootstrap Configuration' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Bootstrap Configuration
Product: Firefox → Firefox Build System

I reviewed the code, this CL D119542 breaks the mach bootstrap.

I found tow issues after code review:

  1. Append application to maybe_install_private_packages_or_exit argument list will break this line:
    https://hg.mozilla.org/mozilla-central/file/tip/python/mozboot/mozboot/bootstrap.py#l348

  2. I do not think it's a correct way to invoke ensure_browser_packages inside maybe_install_private_packages_or_exit, we should only install private packages in this method, but ensure_browser_packages will install packags to system.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(agi)
Regressed by: 1718341
Has Regression Range: --- → yes
Keywords: regression
Pushed by archaeopteryx@coole-files.de: https://hg.mozilla.org/mozilla-central/rev/cc9b68410686 comment out call which causes ./mach bootstrap to fail. a=bootstrap-fix

Closing as fixed, please verify it worked.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 92 Branch
Assignee: nobody → aryx.bugmail
Regressions: 1721669
Flags: needinfo?(agi)
You need to log in before you can comment on or make changes to this bug.