Closed Bug 1544902 Opened 7 years ago Closed 7 years ago

moz-phab should respect my $MOZBUILD_STATE_PATH environmental variable, rather than just using ~/.mozbuild

Categories

(Conduit :: moz-phab, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dholbert, Assigned: glob)

Details

(Keywords: conduit-triaged)

Attachments

(1 file)

mozilla build configuration & logging goes in ~/.mozbuild by default, but you can override that with the $MOZBUILD_STATE_PATH environmental variable (which I do, to keep my home directory more lightweight).

As of version 1.21, moz-phab now tries to store things in your mozbuild directory, but it does not respect this environmental variable. In particular, I hit bug 1544727 (where it's trying to find a logging directory) with this error:

IOError: [Errno 2] No such file or directory: '/home/dholbert/.mozbuild/moz-phab/moz-phab.log'

...despite the fact that I have this env variable set:
MOZBUILD_STATE_PATH=/scratch/work/builds/.mozbuild

ACTUAL RESULTS:
moz-phab tries to put stuff in ~/.mozbuild (which does not exist on my system)

EXPECTED RESULTS:
moz-phab should respect my MOZBUILD_STATE_PATH environmental variable and put things there instead.

I think the issue is with this line:

MOZBUILD_PATH = os.path.join(HOME_DIR, ".mozbuild", "moz-phab")

https://github.com/mozilla-conduit/review/blob/d0e4945c22df02bab49701bf380fa07cc5985811/moz-phab#L79

For reference, here are some places where the Firefox build system explains & uses this environmental variable:
Explanation:
https://searchfox.org/mozilla-central/rev/d33d470140ce3f9426af523eaa8ecfa83476c806/build/mach_bootstrap.py#19-28

Usage (with fallback to ~/.mozbuild):
https://searchfox.org/mozilla-central/rev/d33d470140ce3f9426af523eaa8ecfa83476c806/toolkit/moz.configure#185-188

Assignee: nobody → glob
Keywords: conduit-triaged
Priority: -- → P2
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: