Closed
Bug 818554
Opened 12 years ago
Closed 12 years ago
./mach build (mozconfig python module) dies on set but undefined environment variables like 'DISTCC_LOG='
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla20
People
(Reporter: keeler, Assigned: gps)
References
Details
Attachments
(1 file)
(deleted),
patch
|
glandium
:
review+
|
Details | Diff | Splinter Review |
For whatever reason, my environment has a few variables that look like this:
DISTCC_LOG=
where the variable is set, but it has no value. mozconfig.py doesn't like this, particularly at line 319, where it reads past the end of the line because it's expecting something to come after the "=".
Assignee | ||
Comment 1•12 years ago
|
||
Relatively straightforward fix with test.
Comment 3•12 years ago
|
||
Comment on attachment 688866 [details] [diff] [review]
Handle empty variables, v1
Review of attachment 688866 [details] [diff] [review]:
-----------------------------------------------------------------
::: python/mozbuild/mozbuild/mozconfig.py
@@ +319,2 @@
>
> + if len(line) == equal_pos + 1:
it would probably be easier to follow if you'd set line[equal_pos + 1:] to some intermediate variable and use that variable.
Attachment #688866 -
Flags: review?(mh+mozilla) → review+
Assignee | ||
Comment 4•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/c93e85a125db
I rewrote the logic to make it easier to read, per review feedback. I have faith in the unit tests.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Reporter | ||
Comment 5•12 years ago
|
||
Awesome - thanks for fixing this so quickly.
Updated•7 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•