Closed Bug 1444219 Opened 6 years ago Closed 6 years ago

Remove unnecessary call to MozbuildObject.from_environment

Categories

(Firefox Build System :: General, enhancement)

enhancement
Not set
normal

Tracking

(firefox61 fixed)

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: darktrojan, Assigned: darktrojan)

References

Details

Attachments

(1 file, 1 obsolete file)

This hasn't been a problem until now, but to make artifact builds we need to run `hg` or `git` in the right directory. To get a working build I've temporarily wired topsrcdir to os.environ['TOPSRCDIR'].

Looking for a better fix.

(Yes, I know c-c might be moving inside m-c in future.)
Attached patch topsrcdir.diff (obsolete) — Splinter Review
These two approaches seem cleanest to me:

1. If $TOPSRCDIR is defined, short-circuit the entire function and use it's value.

OR

2. Once mozilla-central source has been found, check the parent directory for a specific file. If it's there, use that directory as topsrcdir.
Ted, Greg, since this is your code, have you any suggestions?
Geoff: Note that TB is moving (slowly) to having c-c as a subdirectory (comm/) of m-c, rather than the other way around. In particular, all the taskcluster builds are done that way.

Eventually, support for the other layout is going to go away. I'm sure the Firefox build peers want to get rid of the special cases needed to support the layout with c-c as the top-level directory.
It turns out the from_environment call in question is unnecessary anyway, as we already have a MozbuildObject at that point. I shall make a patch to remove it.
Attachment #8957459 - Attachment is obsolete: true
Summary: MozbuildObject.from_environment reports topsrcdir is m-c source when building c-c → Remove unnecessary call to MozbuildObject.from_environment
Assignee: nobody → geoff
Component: Build Config → General
Product: Thunderbird → Firefox Build System
Attachment #8957878 - Flags: review?(mh+mozilla)
Attachment #8957878 - Flags: review?(mh+mozilla) → review?(core-build-config-reviews)
Attachment #8957878 - Flags: review?(core-build-config-reviews) → review?(nfroyd)
Comment on attachment 8957878 [details]
Bug 1444219 - Remove unnecessary call to MozbuildObject.from_environment

https://reviewboard.mozilla.org/r/226848/#review237068

Thank you!
Attachment #8957878 - Flags: review?(nfroyd) → review+
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/integration/autoland/rev/7b61e0e9fc05
Remove unnecessary call to MozbuildObject.from_environment r=froydnj
https://hg.mozilla.org/mozilla-central/rev/7b61e0e9fc05
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: