Closed Bug 1246881 Opened 9 years ago Closed 9 years ago

Generate a header defining MOZ_BUILDID

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox47 fixed)

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(2 files, 4 obsolete files)

No description provided.
Attachment #8717356 - Flags: review?(mshal)
Can't unfortunately use it in AppConstants.java.in, though because the marker is different.
Attachment #8717356 - Attachment is obsolete: true
Attachment #8717356 - Flags: review?(mshal)
Attachment #8717369 - Flags: review?(mshal)
This could be useful in bug 1153978.
Not sure how this happened, but I was missing the platform.ini part.
Attachment #8717369 - Attachment is obsolete: true
Attachment #8717369 - Flags: review?(mshal)
Attachment #8717743 - Flags: review?(mshal)
Comment on attachment 8717744 [details] [diff] [review] Only pass MOZ_BUILDID to the one source that requires it in toolkit/xre Moving this patch to bug 1241613.
Attachment #8717744 - Attachment is obsolete: true
Attachment #8717744 - Flags: review?(mshal)
Blocks: 1241613
Blocks: 1247162
Comment on attachment 8717370 [details] [diff] [review] Stop using config/buildid in few remaining places >+$buildid =~ s/^#define MOZ_BUILDID\s+(.*\S)\s*$/$1/; Why not just (\S+) instead of (.*\S) ? I don't think the header will work if there are whitespace characters in the buildid string anyway.
Attachment #8717370 - Flags: review?(mshal) → review+
Comment on attachment 8717743 [details] [diff] [review] Generate a header defining MOZ_BUILDID Overall this looks good, and it addresses my concern about platform.ini not having a buildid dependency now :) >diff --git a/build/variables.py b/build/variables.py >+def buildid_header(output): >+ buildid = os.environ.get('MOZ_BUILD_DATE') >+ if buildid and len(buildid) != 14: >+ print('Ignoring invalid MOZ_BUILD_DATE: %s' % buildid, file=sys.stderr) >+ buildid = None >+ if not buildid: >+ buildid = datetime.now().strftime('%Y%m%d%H%M%S') >+ output.write("#define MOZ_BUILDID %s\n" % buildid) client.mk: ifdef MOZ_UNIFY_BDATE ifndef MOZ_BUILD_DATE ifdef MOZ_BUILD_PROJECTS MOZ_BUILD_DATE = $(shell $(PYTHON) $(TOPSRCDIR)/toolkit/xre/make-platformini.py --print-buildid) export MOZ_BUILD_DATE endif endif Can we use the new build/variables.py when generating the buildid for universal builds as well? I don't like that we now have two scripts to generate the same thing (a date string) depending on what's being built. If we use build/variables.py here, then I think we can kill make-platformini.py as well. (Or, have make-platformini.py generate buildid.h instead of adding variables.py)
Attachment #8717743 - Flags: review?(mshal) → feedback+
Attachment #8717743 - Attachment is obsolete: true
Attachment #8718103 - Flags: review?(mshal)
Comment on attachment 8718103 [details] [diff] [review] Generate a header defining MOZ_BUILDID Looks good to me! Though I suppose this comment is out of date now: https://dxr.mozilla.org/mozilla-central/source/python/mozbuild/mozbuild/android_version_code.py#79
Attachment #8718103 - Flags: review?(mshal) → review+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
https://hg.mozilla.org/comm-central/rev/c3cbaf48ff68694c15fbc863c65cb57e6d19da01 Port Bug 1246881 - Generate a header defining MOZ_BUILDID for c-c. rs=bustage=fix
Depends on: 1249912
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: