Closed Bug 982075 Opened 6 years ago Closed 6 years ago

addEntriesToListFile() in buildlist.py makes builds non-deterministic

Categories

(Firefox Build System :: General, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
mozilla31

People

(Reporter: gk, Assigned: gk)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

When calling addEntriesToListFile() it can happen that the resulting entries in different builds are in different order. This does not fit to the goal of deterministic builds and should therefore get fixed.
test_buildlist.py is still happy. Seems good to go then, I hope.
Assignee: nobody → gk
Status: NEW → ASSIGNED
Attachment #8389139 - Flags: review?(gps)
I won't be able to review this until next week. Reassign to :glandium or :mshal if you want a speedier review.
Comment on attachment 8389139 [details] [diff] [review]
make addEntriesToListFile() deterministic

Review of attachment 8389139 [details] [diff] [review]:
-----------------------------------------------------------------

I'll just r+ this since it's trivial.

::: python/mozbuild/mozbuild/action/buildlist.py
@@ +34,1 @@
>      f.close()

can you swap this to be:
with open(listFile, 'w') as f:
  f.write(...)
and ditch the close while you're here?
Attachment #8389139 - Flags: review?(gps) → review+
Thanks for the review. I changed the code accordingly.
Attachment #8389139 - Attachment is obsolete: true
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/8f6b2d2b2000
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.