From 33768e74f6ad1d77eca314099aba5a8ca9991160 Mon Sep 17 00:00:00 2001 From: Leo Schwarz Date: Tue, 25 Oct 2016 10:28:59 +0200 Subject: [PATCH] Bug 1312290 - Force package extension when building AUR packages on Arch Linux. r=gps Previously if an Arch Linux user had a different package extension configured in `/etc/makepkg.conf` building AUR packages during bootstrap would fail. Forcing the extension by providing it as an environment variable makes sure building doesn't fail regarding of a user's configuration. MozReview-Commit-ID: 4aryYS0XVr7 --HG-- extra : rebase_source : 4c466e49f729de625e814a92325c6d38e6d1e0b4 --- python/mozboot/mozboot/archlinux.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/python/mozboot/mozboot/archlinux.py b/python/mozboot/mozboot/archlinux.py index 01142715f886..12ce6b4a4692 100644 --- a/python/mozboot/mozboot/archlinux.py +++ b/python/mozboot/mozboot/archlinux.py @@ -168,8 +168,8 @@ class ArchlinuxBootstrapper(BaseBootstrapper): self.run_as_root(command) - def run(self, command): - subprocess.check_call(command, stdin=sys.stdin) + def run(self, command, env=None): + subprocess.check_call(command, stdin=sys.stdin, env=env) def download(self, uri): command = ['curl', '-L', '-O', uri] @@ -189,8 +189,10 @@ class ArchlinuxBootstrapper(BaseBootstrapper): def makepkg(self, name): command = ['makepkg', '-s'] - self.run(command) - pack = glob.glob(name + '*.tar.xz')[0] + makepkg_env = os.environ.copy() + makepkg_env['PKGEXT'] = '.pkg.tar.xz' + self.run(command, env=makepkg_env) + pack = glob.glob(name + '*.pkg.tar.xz')[0] command = ['pacman', '-U'] if self.no_interactive: command.append('--noconfirm')