Closed Bug 1617984 Opened 1 year ago Closed 1 year ago

"./mech bootstrap" fails on Archlinux when PKGDEST is set in /etc/makepkg.conf


(Firefox Build System :: Bootstrap Configuration, defect)

73 Branch
Not set


(firefox75 fixed)

Tracking Status
firefox75 --- fixed


(Reporter: sekhavat17, Assigned: sekhavat17)



(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:73.0) Gecko/20100101 Firefox/73.0

Steps to reproduce:

In archlinux:

  1. Uncomment the line #PKGDEST=/home/packages in /etc/makepkg.conf
  2. Clone gecko-dev repository and cd gecko-dev
  3. ./mesh bootstrap

Actual results:

The pkg.tar.xz file is built in /home/packages, instead of cwd and the script will not be able to locate it and the following exception is thrown:

Error running mach:


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

The details of the failure are as follows:

IndexError: list index out of range

File "/home/mohammad/src/gecko-dev/python/mozboot/mozboot/", line 44, in bootstrap
File "/home/mohammad/src/gecko-dev/python/mozboot/mozboot/", line 456, in bootstrap
getattr(self.instance, 'install_%s_packages' % application)()
File "/home/mohammad/src/gecko-dev/python/mozboot/mozboot/", line 92, in install_browser_artifact_mode_packages
File "/home/mohammad/src/gecko-dev/python/mozboot/mozboot/", line 102, in ensure_browser_packages
File "/home/mohammad/src/gecko-dev/python/mozboot/mozboot/", line 214, in aur_install
File "/home/mohammad/src/gecko-dev/python/mozboot/mozboot/", line 188, in makepkg
pack = glob.glob(name + '

Expected results:

The environment variable "PKGDEST=." should have been set before makepkg so that the error doesn't happen and bootstrap continues.

Makepkg does have a commented config in /etc/makepkg.conf to set the path for packages to be built:
When you uncommit this line, packages will be built in the specified path, instead of cwd. This causes the bootstrap script to fail.

This commit will override the PKGDEST config so that package is built in cwd and could be located by the following lines of script.

Assignee: nobody → sekhavat17

I just created a patch to fix this:

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Bootstrap Configuration
Product: Firefox → Firefox Build System
Attachment #9128924 - Attachment description: Bug 1617984 - Fix mesh bootstrap failure on Archlinux when PKGDEST is set; r=chmanchester → Bug 1617984 - Fix mach bootstrap failure on Archlinux when PKGDEST is set; r=chmanchester
Pushed by
Fix mach bootstrap failure on Archlinux when PKGDEST is set; r=firefox-build-system-reviewers,rstewart
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
You need to log in before you can comment on or make changes to this bug.