Closed Bug 494048 Opened 15 years ago Closed 15 years ago

Update partner repack script to work with Firefox 3.5 builds

Categories

(Release Engineering :: Release Requests, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: coop, Assigned: coop)

References

Details

Attachments

(2 files, 1 obsolete file)

We need to update the repack script to cope with differences between 3.0 & 3.5 builds so we can use it to repack both. Among other things, the directory structure for 3.5 builds has changed on stage from 3.0. I don't think there have been any internal build structure changes, but we'll need to confirm this too.

Should be fairly easy to do some directory structure switching based on the mandatory version string (-v) that gets passed to the script.
Assignee: nobody → ccooper
Priority: -- → P3
Blocks: 486573
Status: NEW → ASSIGNED
Priority: P3 → P2
Attached patch Enable partner repacks for 3.5 (obsolete) — Splinter Review
Probably goes without saying, but please check the version detection code. I've made some assumptions about how 3.5-era builds are going to be named once we drop "beta" from the name.

I've tested this out successfully against both 3.0.11 and 3.5b4 locally.
Attachment #379246 - Flags: review?(nthomas)
Comment on attachment 379246 [details] [diff] [review]
Enable partner repacks for 3.5

>diff --git a/scripts/partner-repacks.py b/scripts/partner-repacks.py
>+def getFilename(version, platform, locale, file_ext):
>+    '''Returns the properly formatted filename based on the version string.
>+       File location/nomenclature changed starting with 3.5.
>+    '''
>+    # Deal with alpha/beta releases.
>+    m = re.match('(\d\.\d)([ab])(\d+)', version)
>+    if m:
>+        if m.group(2) == 'b':
>+            greek = "Beta"
>+        else:
>+            greek = "Alpha"
>+        version_formatted = "%s %s %s" % (m.group(1), greek, m.group(3))

If you want to also support release candidates, then the filenames look like firefox-3.5rc1.tar.bz2, Firefox 3.5 RC 1.dmg, and Firefox Setup 3.5 RC 1.exe.

>+    else:
>+        if isLinux(platform):            
>+            return "firefox-%s.%s" % (version,
>+                                      file_ext)
>+        if isMac(platform):
>+            return "Firefox %s.%s" % (version_formatted,
>+                                      file_ext)
>+        if isWin(platform):            
>+            return "Firefox Setup %s.%s" % (version_formatted,
>+                                            file_ext)

Mac and Windows will fail for 3.5.1 and later because version_formatted won't be defined.

>+#########################################################################
>+def getFileExtension(version, platform):
...
>+        if version.startswith('3.0'):
>+            return "installer.exe"
>+        return "exe"

Style nit - use an else clause for the return "exe". Everything else looks OK.
Attachment #379246 - Flags: review?(nthomas) → review-
Addresses problems with the previous version, chiefly adding support for RCs and setting version_formatted to version at the outset so it's always defined.
Attachment #379246 - Attachment is obsolete: true
Attachment #379690 - Flags: review?(nthomas)
Attachment #379690 - Flags: review?(nthomas) → review+
Comment on attachment 379690 [details] [diff] [review]
Enable partner repacks for 3.5, v2

changeset:   11:c6eab948b681
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
ran it through its paces this morning and the script failed on mac builds. root cause was linked to /tmp/FirefoxInstaller being owned by the user which ran the script last. might be an idea to force 777 on directory creation or set up and tear down the directory used as the attach point for the dmg each time.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
one other thing, also to do with macs (yay macs!). with our special case for japan, where the locale for mac builds is "ja-JP-mac" and not "ja", there needs to be a conditional in place which will specify the correct locale for the mac builds when "ja" is set as the locale, otherwise the wget fails and the script exits with:

Error: shellCommand had non-zero exit status: 1
command was: wget -q "http://stage.mozilla.org/pub/mozilla.org/firefox/nightly/3.5b4-candidates/build1/mac/ja/Firefox 3.5 Beta 4.dmg"
Status: REOPENED → ASSIGNED
Attachment #380190 - Flags: review?(nthomas) → review+
Comment on attachment 380190 [details] [diff] [review]
Check for non-existent locale/platform combos, clean up mountpoint for Mac repacks when we're done

changeset:   12:5e8d80001ebc
Status: ASSIGNED → RESOLVED
Closed: 15 years ago15 years ago
Resolution: --- → FIXED
Blocks: 497156
Component: Release Engineering: Custom Builds → Release Engineering: Releases
Product: mozilla.org → Release Engineering
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: