Last Comment Bug 550704 - js/src/config/check-sync-dirs.py doesn't check file contents
: js/src/config/check-sync-dirs.py doesn't check file contents
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: Trunk
: All All
: -- major (vote)
: mozilla1.9.3a4
Assigned To: Mike Hommey [:glandium]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-03-06 10:52 PST by Mike Hommey [:glandium]
Modified: 2010-03-29 17:24 PDT (History)
4 users (show)
bugzillamozillaorg_serge_20140323: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
.4-fixed
.10-fixed


Attachments
Patch [Checkin: Comment 3 & 5 & 6] (617 bytes, patch)
2010-03-06 10:53 PST, Mike Hommey [:glandium]
ted: review+
dveditz: approval1.9.2.4+
dveditz: approval1.9.1.10+
Details | Diff | Review

Description Mike Hommey [:glandium] 2010-03-06 10:52:47 PST
From the python documentation:
filecmp.cmp(f1, f2[, shallow])
    Compare the files named f1 and f2, returning True if they seem equal, False otherwise.
    Unless shallow is given and is false, files with identical os.stat() signatures are taken to be equal.

In check-sync-dirs.py, shallow is not given, and if the compared files happen to have the same modification time and size, but not the same content, an error won't be emitted.

You'd think it's not important and highly improbable, but it just happened to me: I had significantly different config/rules.mk files, with same size and modification time (due to the fact the source was unpacked, then patched, so all the patches filed were modified within the same second), and the differences weren't (obviously) spotted.
Comment 1 Mike Hommey [:glandium] 2010-03-06 10:53:18 PST
Created attachment 430862 [details] [diff] [review]
Patch
[Checkin: Comment 3 & 5 & 6]
Comment 2 Ted Mielczarek [:ted.mielczarek] 2010-03-06 17:10:37 PST
cjones hit this the other day in the opposite case, he had two config.mk files with the same contents, but different mtimes or something like that, and the script was complaining. That default behavior of filecmp is bizarre to me.
Comment 3 Serge Gautherie (:sgautherie) 2010-03-20 10:48:08 PDT
Comment on attachment 430862 [details] [diff] [review]
Patch
[Checkin: Comment 3 & 5 & 6]


http://hg.mozilla.org/mozilla-central/rev/d9808811bb01
Comment 4 Daniel Veditz [:dveditz] 2010-03-29 10:47:34 PDT
Comment on attachment 430862 [details] [diff] [review]
Patch
[Checkin: Comment 3 & 5 & 6]

Approved for 1.9.2.3 and 1.9.1.10, a=dveditz for release-drivers
Comment 5 Serge Gautherie (:sgautherie) 2010-03-29 16:49:16 PDT
Comment on attachment 430862 [details] [diff] [review]
Patch
[Checkin: Comment 3 & 5 & 6]


http://hg.mozilla.org/releases/mozilla-1.9.2/rev/52991d0b8a5b
Comment 6 Serge Gautherie (:sgautherie) 2010-03-29 17:23:55 PDT
Comment on attachment 430862 [details] [diff] [review]
Patch
[Checkin: Comment 3 & 5 & 6]


http://hg.mozilla.org/releases/mozilla-1.9.1/rev/3a731a04de7c

Note You need to log in before you can comment on or make changes to this bug.