Closed Bug 902619 Opened 8 years ago Closed 8 years ago

Write mozinfo.json as part of config.status


(Firefox Build System :: General, defect)

Not set


(Not tracked)



(Reporter: gps, Assigned: gps)




(1 file)

Currently mozinfo.json is written out after AC_OUTPUT/config.status. For bug 901990, we need to process test manifests during traversal. However, test manifests rely on data from mozinfo.json to perform filtering, etc. This means needs to load mozinfo.json. This means mozinfo.json needs to be created before config.status runs.

Unfortunately, currently relies on config.status (via importing buildconfig) to pull in build config data. The only solution I see to this is to write out mozinfo.json inside config.status. This will likely involve moving into the mozbuild package.
Do whatever you feel is necessary. writemozinfo is just a hack.
There are both mechanical and logical changes in this patch.

The mechanical changes involve moving some files into the mozbuild

The logical changes include move writing of mozinfo.json into
config.status (from There were some variable assignments
being performed in These variables were read from However, these variables don't appear to be necessary!
Now that mozinfo has full access to the underlying config.status data
structure, it can now access these variables directly. I verified that
every variable being assigned in had a corresponding
AC_SUBST earlier in the file.

The only variable that's a bit weird is the TOPSRCDIR and MOZCONFIG
environment variables. mozinfo continues to look in the environment for
MOZCONFIG. However TOPSRCDIR is now coming from config.status.

As part of moving the code, I also modernized the test file, cleaned up
some style, and removed some unused imports.
Attachment #787159 - Flags: review?(ted)
Assignee: nobody → gps
Comment on attachment 787159 [details] [diff] [review]
Write mozinfo.json as part of config.status

Review of attachment 787159 [details] [diff] [review]:

Looks nice! This started out as a huge hack, feels a lot nicer now.

::: python/mozbuild/mozbuild/
@@ +5,1 @@
>  # The output file is intended to be used as input to the mozinfo package.

Can you restore a bit of the comment here (even if you have to rephrase it)? This line is lacking context.
Attachment #787159 - Flags: review?(ted) → review+
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.