Closed Bug 897045 Opened 11 years ago Closed 11 years ago

./mach build fails if there is no .mozconfig file

Categories

(Firefox Build System :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla25

People

(Reporter: gustavold, Assigned: gps)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36

Steps to reproduce:

Check out latest mozilla-central (139555:b717a7945dfb) 
rm -f .mozconfig
./mach build


Actual results:

TypeError: 'NoneType' object is not iterable

  File "/home/buildbot/buildbot/slave/runtests/build/python/mozbuild/mozbuild/mach_commands.py", line 273, in build
    warnings_path = self._get_state_filename('warnings.json')
  File "/home/buildbot/buildbot/slave/runtests/build/python/mozbuild/mozbuild/base.py", line 313, in _get_state_filename
    path = self.statedir
  File "/home/buildbot/buildbot/slave/runtests/build/python/mozbuild/mozbuild/base.py", line 233, in statedir
    return os.path.join(self.topobjdir, '.mozbuild')
  File "/home/buildbot/buildbot/slave/runtests/build/python/mozbuild/mozbuild/base.py", line 179, in topobjdir
    self._config_guess)
  File "/home/buildbot/buildbot/slave/runtests/build/python/mozbuild/mozbuild/base.py", line 286, in _config_guess
    make_extra = dict(m.split('=', 1) for m in self.mozconfig['make_extra'])


See full build log here: http://mozillaproject.osuosl.org:8010/builders/runtests/builds/85/steps/shell/logs/stdio
Mike: this seems to be code you just added.
Blocks: 894763
Component: mach → Build Config
Definitely a regression from bug 894763. I can repro.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Trivial patch.
Attachment #779868 - Flags: review?(mshal)
Assignee: nobody → gps
We're seeing this on Thunderbird Trunk, I'm sort of expecting due to the fact our .mozconfig is in a different dir to the mozilla root:

https://tbpl.mozilla.org/php/getParsedLog.php?id=25614970&tree=Thunderbird-Trunk

TEST-UNEXPECTED-FAIL | /builds/slave/tb-c-cen-l64-d-000000000000000/build/mozilla/python/mozbuild/mozbuild/test/test_base.py | line 54, test_config_guess: 'NoneType' object is not iterable
TEST-PASS | /builds/slave/tb-c-cen-l64-d-000000000000000/build/mozilla/python/mozbuild/mozbuild/test/test_base.py | test_objdir_config_guess
TEST-PASS | /builds/slave/tb-c-cen-l64-d-000000000000000/build/mozilla/python/mozbuild/mozbuild/test/test_base.py | test_path_argument
ERROR: test_config_guess (__main__.TestMozbuildObject)
Traceback (most recent call last):
  File "/builds/slave/tb-c-cen-l64-d-000000000000000/build/mozilla/python/mozbuild/mozbuild/test/test_base.py", line 54, in test_config_guess
    result = base._config_guess
  File "/builds/slave/tb-c-cen-l64-d-000000000000000/build/mozilla/python/mozbuild/mozbuild/base.py", line 286, in _config_guess
    make_extra = dict(m.split('=', 1) for m in self.mozconfig['make_extra'])
TypeError: 'NoneType' object is not iterable

make[2]: *** [run-/builds/slave/tb-c-cen-l64-d-000000000000000/build/mozilla/python/mozbuild/mozbuild/test/test_base.py] Error 1
Comment on attachment 779868 [details] [diff] [review]
Properly handle extra make arguments if there is no mozconfig

Looks good!
Attachment #779868 - Flags: review?(mshal) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/8d10d4fffa5b
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla25
https://hg.mozilla.org/mozilla-central/rev/8d10d4fffa5b
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: