Closed Bug 1684348 Opened 5 years ago Closed 5 years ago

mac bootstrap fails when calling brew cask list

Categories

(Firefox Build System :: Bootstrap Configuration, defect)

Firefox 86
defect

Tracking

(firefox86 fixed)

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

(Reporter: ankushduacodes, Assigned: ankushduacodes)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36

Steps to reproduce:

ran ./mach bootstrap

Actual results:

Encountering an error Error: Calling brew cask list is disabled! Use brew list [--cask] instead.

I have submitted a patch for this issue but forgot to add someone for review (I am sorry about that). Could you please assign yourself or someone for a review of the patch.

Thank you!...

Flags: needinfo?(mhentges)

Thanks for the patch! Looks like this issue has been resolved by :longsonr :)

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Flags: needinfo?(mhentges)
Resolution: --- → DUPLICATE

Hi Mitchell, I am aware of the bug mentioned above but it only solves for brew list command not for brew cask list which was also deprecated by homebrew team.

If you try to bootstrap for android the error will be produced and the bootstrap process will exit.

Warm Regards,
Ankush Dua

Flags: needinfo?(mhentges)

To be more specific here are some more details on this issue:-

When brew list command was usable it used to list all the formulae and casks installed.

But in the present Homebrew version, the API has changed significantly ie. when we call brew list --formula it only lists installed formulae not casks.

Now to get the list of casks installed we need to call brew list --cask.

You may wonder why I am not just strapping brew list --formula --cask this is because --formula and --cask needs to be called seperately.

Status: RESOLVED → UNCONFIRMED
Flags: needinfo?(mhentges)
Resolution: DUPLICATE → ---

Oh, my mistake!
Can you paste the error that happens in ./mach bootstrap? I can't reproduce the problem :(
Also, are you on an up-to-date checkout of the source code?

Flags: needinfo?(ankushduacodes)

Hi Mitchell, here are the details you asked for:

Error: Calling brew cask list is disabled! Use brew list [--cask] instead.
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:

subprocess.CalledProcessError: Command '['/usr/local/bin/brew', 'cask', 'list', '--formula']' returned non-zero exit status 1.

  File "/Users/ankushdua/src/mozilla-unified/python/mozboot/mozboot/mach_commands.py", line 58, in bootstrap
    bootstrapper.bootstrap()
  File "/Users/ankushdua/src/mozilla-unified/python/mozboot/mozboot/bootstrap.py", line 422, in bootstrap
    getattr(self.instance, "install_%s_packages" % application)(mozconfig_builder)
  File "/Users/ankushdua/src/mozilla-unified/python/mozboot/mozboot/osx.py", line 223, in install_mobile_android_packages
    getattr(self, "ensure_%s_mobile_android_packages" % self.package_manager)(
  File "/Users/ankushdua/src/mozilla-unified/python/mozboot/mozboot/osx.py", line 412, in ensure_homebrew_mobile_android_packages
    self._ensure_homebrew_casks(casks)
  File "/Users/ankushdua/src/mozilla-unified/python/mozboot/mozboot/osx.py", line 376, in _ensure_homebrew_casks
    self._ensure_homebrew_packages(casks, extra_brew_args=["cask"])
  File "/Users/ankushdua/src/mozilla-unified/python/mozboot/mozboot/osx.py", line 337, in _ensure_homebrew_packages
    subprocess.check_output(
  File "/Users/ankushdua/anaconda3/lib/python3.8/subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/Users/ankushdua/anaconda3/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
Sentry is attempting to send 0 pending error messages
Waiting up to 2 seconds
Press Ctrl-C to quit

I just did git pull --rebase the error is still there when I try to build for android ie option 3 or 4 after the command ./mach bootstrap. To confirm this here is output of git log -1:

commit e4593d859085204f47b23288e70cbaf216bd4ddb (HEAD -> bookmarks/central, origin/bookmarks/central, refs/cinnabar/refs/heads/bookmarks/central)
Author: Julian Descottes <jdescottes@mozilla.com>
Date:   Mon Jan 4 13:28:48 2021 +0000

    Bug 1678550 - [devtools] Add proper linting to damp.js and damp-test.js r=perftest-reviewers,nchevobbe,ochameau
    
    Depends on D97732
    
    Differential Revision: https://phabricator.services.mozilla.com/D97733

Now you may not be able to reproduce this issue because your Homebrew may not be up to date as this change to brew API was fairly recent, dating back just a couple of weeks or might be as recent as last week of December.
Here is the output of brew --version on my machine:

⋊> ~/s/mozilla-unified on bookmarks/central ◦ brew --version     (base) 00:08:33
Homebrew 2.7.1
Homebrew/homebrew-core (git revision d1352; last commit 2021-01-04)
Homebrew/homebrew-cask (git revision 12e22; last commit 2021-01-04)

Thank you!...

Flags: needinfo?(ankushduacodes) → needinfo?(mhentges)

I suspect this may affect all the newcomers to the project. As it essentially is stopping users from starting up with the project.

Oh, this happens with android builds! I can reproduce this now.
Thanks for the patch! I'll leave a review on Phabricator :)

Assignee: nobody → ankushduacodes
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(mhentges)
Pushed by mhentges@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3f25df50e77c Patching error occuring while running brew cask list as this method has been deprecated by homebrew r=mhentges

Should I mark this as resolved?

Flags: needinfo?(mhentges)

It'll be auto-marked as resolved when it gets merged into mozilla-central from autoland and the tests pass :)

Flags: needinfo?(mhentges)
Status: ASSIGNED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: