Backed out 2 changesets (bug 1163082) for Robocop rc1 failures.
authorNick Alexander <nalexander@mozilla.com>
Wed, 03 Feb 2016 23:15:00 -0800
changeset 321088 03297f8c28a08d2b39a252c7b368524d9e69da69
parent 321087 baf25be8d4917e6dcc52eede79e61e1837328c86
child 321250 f53533d9eb771f3251921949ab2c888def70f41f
child 321251 df69b3262b511333a5d8da8f02123fcac9cc95c2
push id1128
push userjlund@mozilla.com
push dateWed, 01 Jun 2016 01:31:59 +0000
treeherdermozilla-release@fe0d30de989d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1163082
milestone47.0a1
backs outbaf25be8d4917e6dcc52eede79e61e1837328c86
e228040a044b7ff7363a178da2cb0b8b42724048
first release with
nightly linux32
03297f8c28a0 / 47.0a1 / 20160204030229 / files
nightly linux64
03297f8c28a0 / 47.0a1 / 20160204030229 / files
nightly mac
03297f8c28a0 / 47.0a1 / 20160204030229 / files
nightly win32
03297f8c28a0 / 47.0a1 / 20160204030229 / files
nightly win64
03297f8c28a0 / 47.0a1 / 20160204030229 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out 2 changesets (bug 1163082) for Robocop rc1 failures. Backed out changeset baf25be8d491 (bug 1163082) Backed out changeset e228040a044b (bug 1163082)
configure.in
mobile/android/app/build.gradle
mobile/android/base/java/org/mozilla/gecko/distribution/Distribution.java
mobile/android/base/moz.build
mobile/android/installer/package-manifest.in
toolkit/mozapps/installer/upload-files.mk
--- a/configure.in
+++ b/configure.in
@@ -4003,32 +4003,16 @@ MOZ_ARG_ENABLE_BOOL(android-resource-con
                           Exclude hi-res images and similar from the final APK],
     MOZ_ANDROID_RESOURCE_CONSTRAINED=1)
 
 if test -n "$MOZ_ANDROID_RESOURCE_CONSTRAINED"; then
     AC_DEFINE(MOZ_ANDROID_RESOURCE_CONSTRAINED)
 fi
 AC_SUBST(MOZ_ANDROID_RESOURCE_CONSTRAINED)
 
-# Optional Firefox for Android partner distribution directory.
-MOZ_ARG_WITH_STRING(android-distribution-directory,
-[  --with-android-distribution-directory=dir
-                          Optional Firefox for Android partner distribution directory.],
-  MOZ_ANDROID_DISTRIBUTION_DIRECTORY=$withval)
-
-if test -n "$MOZ_ANDROID_DISTRIBUTION_DIRECTORY"; then
-  # A distribution directory must have an assets/distribution directory.
-  # See https://wiki.mozilla.org/Mobile/Distribution_Files.
-  if test ! -d "$MOZ_ANDROID_DISTRIBUTION_DIRECTORY/assets/distribution" ; then
-    AC_MSG_ERROR([--with-android-distribution-directory does not contain assets/distribution;
-                  (looked for ${MOZ_ANDROID_DISTRIBUTION_DIRECTORY}/assets/distribution).])
-  fi
-fi
-AC_SUBST(MOZ_ANDROID_DISTRIBUTION_DIRECTORY)
-
 dnl ========================================================
 dnl = Trademarked Branding
 dnl ========================================================
 MOZ_ARG_ENABLE_BOOL(official-branding,
 [  --enable-official-branding
                           Enable Official mozilla.org Branding
                           Do not distribute builds with
                           --enable-official-branding unless you have
--- a/mobile/android/app/build.gradle
+++ b/mobile/android/app/build.gradle
@@ -60,21 +60,16 @@ android {
         // Automation builds.
         automation {
         }
     }
 
     sourceSets {
         main {
             manifest.srcFile "${topobjdir}/mobile/android/base/AndroidManifest.xml"
-            assets {
-                if (mozconfig.substs.MOZ_ANDROID_DISTRIBUTION_DIRECTORY) {
-                    srcDir "${mozconfig.substs.MOZ_ANDROID_DISTRIBUTION_DIRECTORY}/assets"
-                }
-            }
         }
 
         androidTest {
             java {
                 srcDir "${topsrcdir}/mobile/android/tests/browser/robocop/src"
                 srcDir "${topsrcdir}/mobile/android/tests/background/junit3/src"
                 srcDir "${topsrcdir}/mobile/android/tests/browser/junit3/src"
                 srcDir "${topsrcdir}/mobile/android/tests/javaddons/src"
--- a/mobile/android/base/java/org/mozilla/gecko/distribution/Distribution.java
+++ b/mobile/android/base/java/org/mozilla/gecko/distribution/Distribution.java
@@ -638,17 +638,17 @@ public class Distribution {
     }
 
     /**
      * @return true if we copied files out of the APK. Sets distributionDir in that case.
      */
     private boolean copyAndCheckAPKDistribution() {
         try {
             // First, try copying distribution files out of the APK.
-            if (copyFilesFromPackagedAssets()) {
+            if (copyFiles()) {
                 // We always copy to the data dir, and we only copy files from
                 // a 'distribution' subdirectory. Now determine our actual distribution directory.
                 return checkDataDistribution();
             }
         } catch (IOException e) {
             Log.e(LOGTAG, "Error copying distribution files from APK.", e);
         }
         return false;
@@ -713,48 +713,42 @@ public class Distribution {
 
             writeStream(jar, outFile, entry.getTime(), buffer);
         }
 
         return distributionSet;
     }
 
     /**
-     * Copies the /assets/distribution folder out of the APK and into the app's data directory.
+     * Copies the /distribution folder out of the APK and into the app's data directory.
      * Returns true if distribution files were found and copied.
      */
-    private boolean copyFilesFromPackagedAssets() throws IOException {
+    private boolean copyFiles() throws IOException {
         final File applicationPackage = new File(packagePath);
         final ZipFile zip = new ZipFile(applicationPackage);
 
-        final String assetsPrefix = "assets/";
-        final String fullPrefix = assetsPrefix + DISTRIBUTION_PATH;
-
         boolean distributionSet = false;
         try {
             final byte[] buffer = new byte[1024];
 
             final Enumeration<? extends ZipEntry> zipEntries = zip.entries();
             while (zipEntries.hasMoreElements()) {
                 final ZipEntry fileEntry = zipEntries.nextElement();
                 final String name = fileEntry.getName();
 
                 if (fileEntry.isDirectory()) {
                     // We'll let getDataFile deal with creating the directory hierarchy.
                     continue;
                 }
 
-                // Read from "assets/distribution/**".
-                if (!name.startsWith(fullPrefix)) {
+                if (!name.startsWith(DISTRIBUTION_PATH)) {
                     continue;
                 }
 
-                // Write to "distribution/**".
-                final String nameWithoutPrefix = name.substring(assetsPrefix.length());
-                final File outFile = getDataFile(nameWithoutPrefix);
+                final File outFile = getDataFile(name);
                 if (outFile == null) {
                     continue;
                 }
 
                 distributionSet = true;
 
                 final InputStream fileStream = zip.getInputStream(fileEntry);
                 try {
--- a/mobile/android/base/moz.build
+++ b/mobile/android/base/moz.build
@@ -880,21 +880,16 @@ ANDROID_GENERATED_RESFILES += [
     'res/raw/suggestedsites.json',
     'res/values/strings.xml',
 ]
 
 ANDROID_ASSETS_DIRS += [
     '/mobile/android/app/assets',
 ]
 
-if CONFIG['MOZ_ANDROID_DISTRIBUTION_DIRECTORY']:
-    ANDROID_ASSETS_DIRS += [
-        '%' + CONFIG['MOZ_ANDROID_DISTRIBUTION_DIRECTORY'] + '/assets',
-    ]
-
 # We do not expose MOZ_INSTALL_TRACKING_ADJUST_SDK_APP_TOKEN here because that
 # would leak the value to build logs.  Instead we expose the token quietly where
 # appropriate in Makefile.in.
 for var in ('MOZ_ANDROID_ANR_REPORTER', 'MOZ_LINKER_EXTRACT', 'MOZ_DEBUG',
             'MOZ_ANDROID_SEARCH_ACTIVITY', 'MOZ_NATIVE_DEVICES', 'MOZ_ANDROID_MLS_STUMBLER',
             'MOZ_ANDROID_DOWNLOADS_INTEGRATION', 'MOZ_INSTALL_TRACKING',
             'MOZ_ANDROID_GCM'):
     if CONFIG[var]:
--- a/mobile/android/installer/package-manifest.in
+++ b/mobile/android/installer/package-manifest.in
@@ -73,16 +73,17 @@
 @BINPATH@/@DLL_PREFIX@mozglue@DLL_SUFFIX@
 # This should be MOZ_CHILD_PROCESS_NAME, but that has a "lib/" prefix.
 @BINPATH@/@MOZ_CHILD_PROCESS_NAME@
 @BINPATH@/@MOZ_CHILD_PROCESS_NAME_PIE@
 
 [xpcom]
 @BINPATH@/package-name.txt
 @BINPATH@/classes.dex
+@BINPATH@/distribution/*
 
 [browser]
 ; [Base Browser Files]
 @BINPATH@/application.ini
 @BINPATH@/platform.ini
 @BINPATH@/blocklist.xml
 
 ; [Components]
--- a/toolkit/mozapps/installer/upload-files.mk
+++ b/toolkit/mozapps/installer/upload-files.mk
@@ -297,16 +297,17 @@ DIST_FILES += \
   ua-update.json \
   platform.ini \
   greprefs.js \
   browserconfig.properties \
   blocklist.xml \
   chrome.manifest \
   update.locale \
   removed-files \
+  distribution \
   $(NULL)
 
 NON_DIST_FILES = \
   classes.dex \
   $(NULL)
 
 UPLOAD_EXTRA_FILES += gecko-unsigned-unaligned.apk