Bug 1482516 - Use set comparison to determine whether the list of build backend outputs has changed. r=gps,firefox-build-system-reviewers
authorChris Manchester <cmanchester@mozilla.com>
Fri, 10 Aug 2018 22:29:35 +0000
changeset 486156 ebe78e2810c58acd805ef53508f7fdd6692d49ae
parent 486155 1a93db801952311861e6f4817bff9113fe60f531
child 486157 322c3cf43fe843235b7e733eb9d32ce049c8fe41
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps, firefox-build-system-reviewers
bugs1482516
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1482516 - Use set comparison to determine whether the list of build backend outputs has changed. r=gps,firefox-build-system-reviewers If a backend output file is deleted outside of the build system the non-zero "created" count can make the current check erroneously think the list of outputs has changed. Differential Revision: https://phabricator.services.mozilla.com/D3129
python/mozbuild/mozbuild/backend/base.py
--- a/python/mozbuild/mozbuild/backend/base.py
+++ b/python/mozbuild/mozbuild/backend/base.py
@@ -164,18 +164,17 @@ class BuildBackend(LoggingMixin):
         # Remove now empty directories
         for dir in set(mozpath.dirname(d) for d in delete_files):
             try:
                 os.removedirs(dir)
             except OSError:
                 pass
 
         # Write out the list of backend files generated, if it changed.
-        if self._deleted_count or self._created_count or \
-                not os.path.exists(list_file):
+        if backend_output_list != self._backend_output_files:
             with self._write_file(list_file) as fh:
                 fh.write('\n'.join(sorted(self._backend_output_files)))
         else:
             # Always update its mtime if we're not in dry-run mode.
             if not self.dry_run:
                 with open(list_file, 'a'):
                     os.utime(list_file, None)