Closed Bug 1617984 Opened 3 months ago Closed 3 months ago

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

Categories

(Firefox Build System :: Bootstrap Configuration, defect)

73 Branch
defect
Not set
normal

Tracking

(firefox75 fixed)

RESOLVED FIXED
mozilla75
Tracking Status
firefox75 --- fixed

People

(Reporter: sekhavat17, Assigned: sekhavat17)

Details

Attachments

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

['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:

IndexError: list index out of range

File "/home/mohammad/src/gecko-dev/python/mozboot/mozboot/mach_commands.py", line 44, in bootstrap
bootstrapper.bootstrap()
File "/home/mohammad/src/gecko-dev/python/mozboot/mozboot/bootstrap.py", line 456, in bootstrap
getattr(self.instance, 'install_%s_packages' % application)()
File "/home/mohammad/src/gecko-dev/python/mozboot/mozboot/archlinux.py", line 92, in install_browser_artifact_mode_packages
self.ensure_browser_packages(artifact_mode=True)
File "/home/mohammad/src/gecko-dev/python/mozboot/mozboot/archlinux.py", line 102, in ensure_browser_packages
self.aur_install(self.BROWSER_AUR_PACKAGES)
File "/home/mohammad/src/gecko-dev/python/mozboot/mozboot/archlinux.py", line 214, in aur_install
self.makepkg(name)
File "/home/mohammad/src/gecko-dev/python/mozboot/mozboot/archlinux.py", line 188, in makepkg
pack = glob.glob(name + '
.pkg.tar.xz')[0]

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: https://phabricator.services.mozilla.com/D64195

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 cbrindusan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a50491a731c2
Fix mach bootstrap failure on Archlinux when PKGDEST is set; r=firefox-build-system-reviewers,rstewart
Status: UNCONFIRMED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
You need to log in before you can comment on or make changes to this bug.