Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 35976e3d0f36303b035e382c28638010 > files > 18

firefox-24.5.0-1.el5_10.src.rpm

diff -up mozilla-esr24/build/virtualenv/populate_virtualenv.py.python mozilla-esr24/build/virtualenv/populate_virtualenv.py
--- mozilla-esr24/build/virtualenv/populate_virtualenv.py.python	2013-09-11 05:22:20.000000000 +0200
+++ mozilla-esr24/build/virtualenv/populate_virtualenv.py	2013-10-22 16:03:57.000000000 +0200
@@ -16,7 +17,8 @@ import sys
 
 # Minimum version of Python required to build.
 MINIMUM_PYTHON_MAJOR = 2
-MINIMUM_PYTHON_MINOR = 7
+# Override for RHEL
+MINIMUM_PYTHON_MINOR = 4
 
 
 class VirtualenvManager(object):
diff -up mozilla-esr24/dom/bindings/Codegen.py.python mozilla-esr24/dom/bindings/Codegen.py
--- mozilla-esr24/dom/bindings/Codegen.py.python	2013-09-11 05:22:23.000000000 +0200
+++ mozilla-esr24/dom/bindings/Codegen.py	2013-10-22 15:49:15.000000000 +0200
@@ -8440,7 +8440,7 @@ class CGBindingRoot(CGThing):
         def getParentDescriptor(desc):
             if not desc.interface.parent:
                 return set()
-            return { desc.getDescriptor(desc.interface.parent.identifier.name) }
+            return set ([desc.getDescriptor(desc.interface.parent.identifier.name)])
         for x in dependencySortObjects(jsImplemented, getParentDescriptor,
                                        lambda d: d.interface.identifier.name):
             cgthings.append(CGCallbackInterface(x))
diff -up mozilla-esr24/python/mach/mach/logging.py.python mozilla-esr24/python/mach/mach/logging.py
--- mozilla-esr24/python/mach/mach/logging.py.python	2013-09-11 05:22:49.000000000 +0200
+++ mozilla-esr24/python/mach/mach/logging.py	2013-10-22 15:49:15.000000000 +0200
@@ -18,6 +18,10 @@ import logging
 import sys
 import time
 
+class NullHandler(logging.Handler):
+    def emit(self, record):
+        pass
+logging.NullHandler = NullHandler
 
 def format_seconds(total):
     """Format number of seconds to MM:SS.DD form."""
@@ -166,7 +170,7 @@ class LoggingManager(object):
         """Enable JSON logging on the specified file object."""
 
         # Configure the consumer of structured messages.
-        handler = logging.StreamHandler(stream=fh)
+        handler = logging.StreamHandler(fh)
         handler.setFormatter(StructuredJSONFormatter())
         handler.setLevel(logging.DEBUG)
 
@@ -188,7 +192,7 @@ class LoggingManager(object):
                 write_interval=write_interval)
             formatter.set_terminal(self.terminal)
 
-        handler = logging.StreamHandler(stream=fh)
+        handler = logging.StreamHandler(fh)
         handler.setFormatter(formatter)
         handler.setLevel(level)
 
diff -up mozilla-esr24/python/mozbuild/mozbuild/backend/base.py.python mozilla-esr24/python/mozbuild/mozbuild/backend/base.py
--- mozilla-esr24/python/mozbuild/mozbuild/backend/base.py.python	2013-09-11 05:22:49.000000000 +0200
+++ mozilla-esr24/python/mozbuild/mozbuild/backend/base.py	2013-10-22 15:49:15.000000000 +0200
@@ -57,13 +57,13 @@ class BackendConsumeSummary(object):
 
     @property
     def reader_summary(self):
-        return 'Finished reading {:d} moz.build files into {:d} descriptors in {:.2f}s'.format(
+        return 'Finished reading {0:d} moz.build files into {1:d} descriptors in {2:.2f}s'.format(
             self.mozbuild_count, self.object_count,
             self.mozbuild_execution_time)
 
     @property
     def backend_summary(self):
-        return 'Backend executed in {:.2f}s'.format(self.backend_execution_time)
+        return 'Backend executed in {0:.2f}s'.format(self.backend_execution_time)
 
     def backend_detailed_summary(self):
         """Backend summary to be supplied by BuildBackend implementations."""
@@ -72,7 +72,7 @@ class BackendConsumeSummary(object):
     @property
     def total_summary(self):
         efficiency_value = self.cpu_time / self.wall_time if self.wall_time else 100
-        return 'Total wall time: {:.2f}s; CPU time: {:.2f}s; Efficiency: {:.0%}'.format(
+        return 'Total wall time: {0:.2f}s; CPU time: {1:.2f}s; Efficiency: {2:.0%}'.format(
             self.wall_time, self.cpu_time, efficiency_value)
 
     def summaries(self):
diff -up mozilla-esr24/python/mozbuild/mozbuild/backend/recursivemake.py.python mozilla-esr24/python/mozbuild/mozbuild/backend/recursivemake.py
--- mozilla-esr24/python/mozbuild/mozbuild/backend/recursivemake.py.python	2013-09-11 05:22:49.000000000 +0200
+++ mozilla-esr24/python/mozbuild/mozbuild/backend/recursivemake.py	2013-10-22 15:49:15.000000000 +0200
@@ -114,7 +114,7 @@ class RecursiveMakeBackend(BuildBackend)
         self.summary.unchanged_count = 0
 
         def detailed(summary):
-            return '{:d} total backend files. {:d} created; {:d} updated; {:d} unchanged'.format(
+            return '{0:d} total backend files. {1:d} created; {2:d} updated; {3:d} unchanged'.format(
                 summary.managed_count, summary.created_count,
                 summary.updated_count, summary.unchanged_count)
 
diff -up mozilla-esr24/python/mozbuild/mozbuild/frontend/data.py.python mozilla-esr24/python/mozbuild/mozbuild/frontend/data.py
--- mozilla-esr24/python/mozbuild/mozbuild/frontend/data.py.python	2013-09-11 05:22:49.000000000 +0200
+++ mozilla-esr24/python/mozbuild/mozbuild/frontend/data.py	2013-10-22 15:49:15.000000000 +0200
@@ -17,7 +17,7 @@ structures.
 
 from __future__ import unicode_literals
 
-from collections import OrderedDict
+from ordereddict import OrderedDict
 
 
 class TreeMetadata(object):
diff -up mozilla-esr24/python/mozbuild/mozbuild/frontend/reader.py.python mozilla-esr24/python/mozbuild/mozbuild/frontend/reader.py
--- mozilla-esr24/python/mozbuild/mozbuild/frontend/reader.py.python	2013-09-11 05:22:49.000000000 +0200
+++ mozilla-esr24/python/mozbuild/mozbuild/frontend/reader.py	2013-10-22 15:49:15.000000000 +0200
@@ -52,7 +52,7 @@ from .sandbox_symbols import (
 )
 
 
-if sys.version_info.major == 2:
+if sys.version_info[0] == 2:
     text_type = unicode
     type_type = types.TypeType
 else:
diff -up mozilla-esr24/python/mozbuild/mozbuild/frontend/sandbox_symbols.py.python mozilla-esr24/python/mozbuild/mozbuild/frontend/sandbox_symbols.py
--- mozilla-esr24/python/mozbuild/mozbuild/frontend/sandbox_symbols.py.python	2013-09-11 05:22:49.000000000 +0200
+++ mozilla-esr24/python/mozbuild/mozbuild/frontend/sandbox_symbols.py	2013-10-22 15:49:15.000000000 +0200
@@ -17,7 +17,7 @@ the Sandbox consists of, you've come to 
 
 from __future__ import unicode_literals
 
-from collections import OrderedDict
+from ordereddict import OrderedDict
 from mozbuild.util import (
     HierarchicalStringList,
     StrictOrderingOnAppendList,
diff -up mozilla-esr24/python/mozbuild/mozpack/chrome/flags.py.python mozilla-esr24/python/mozbuild/mozpack/chrome/flags.py
--- mozilla-esr24/python/mozbuild/mozpack/chrome/flags.py.python	2013-09-11 05:22:49.000000000 +0200
+++ mozilla-esr24/python/mozbuild/mozpack/chrome/flags.py	2013-10-22 15:49:15.000000000 +0200
@@ -5,7 +5,7 @@
 import re
 from distutils.version import LooseVersion
 from mozpack.errors import errors
-from collections import OrderedDict
+from ordereddict import OrderedDict
 
 
 class Flag(object):
diff -up mozilla-esr24/python/mozbuild/mozpack/copier.py.python mozilla-esr24/python/mozbuild/mozpack/copier.py
--- mozilla-esr24/python/mozbuild/mozpack/copier.py.python	2013-09-11 05:22:49.000000000 +0200
+++ mozilla-esr24/python/mozbuild/mozpack/copier.py	2013-10-22 15:49:15.000000000 +0200
@@ -11,10 +11,9 @@ from mozpack.files import (
 import mozpack.path
 import errno
 from collections import (
-    namedtuple,
-    OrderedDict,
+    namedtuple
 )
-
+from ordereddict import OrderedDict
 
 def ensure_parent_dir(file):
     '''Ensures the directory parent to the given file exists'''
@@ -157,6 +156,7 @@ class FileCopier(FileRegistry):
             destfile = os.path.normpath(os.path.join(destination, path))
             dest_files.add(destfile)
             ensure_parent_dir(destfile)
+            print "file.copy", destfile
             file.copy(destfile, skip_if_older)
 
         actual_dest_files = set()
@@ -272,9 +272,12 @@ class Jarrer(FileRegistry, BaseFile):
             old_jar = JarReader(fileobj=dest)
         except Exception:
             old_jar = []
-
+        print "old jar", old_jar
+        for f in old_jar:
+          print f.filename, f
         old_contents = dict([(f.filename, f) for f in old_jar])
-
+        print "Old content", old_contents
+        print "JarWriter"
         with JarWriter(fileobj=dest, compress=self.compress,
                        optimize=self.optimize) as jar:
             for path, file in self:
diff -up mozilla-esr24/python/mozbuild/mozpack/files.py.python mozilla-esr24/python/mozbuild/mozpack/files.py
--- mozilla-esr24/python/mozbuild/mozpack/files.py.python	2013-09-11 05:22:49.000000000 +0200
+++ mozilla-esr24/python/mozbuild/mozpack/files.py	2013-10-22 15:49:15.000000000 +0200
@@ -17,7 +17,7 @@ from io import BytesIO
 from mozpack.errors import ErrorMessage
 from mozpack.mozjar import JarReader
 import mozpack.path
-from collections import OrderedDict
+from ordereddict import OrderedDict
 
 
 class Dest(object):
@@ -150,8 +150,10 @@ class ExecutableFile(File):
             return False
         try:
             if may_strip(dest):
+                print "strip", dest
                 strip(dest)
             if may_elfhack(dest):
+                print "elfhack", dest
                 elfhack(dest)
         except ErrorMessage:
             os.remove(dest)
diff -up mozilla-esr24/python/mozbuild/mozpack/mozjar.py.python mozilla-esr24/python/mozbuild/mozpack/mozjar.py
--- mozilla-esr24/python/mozbuild/mozpack/mozjar.py.python	2013-09-11 05:22:49.000000000 +0200
+++ mozilla-esr24/python/mozbuild/mozpack/mozjar.py	2013-10-22 15:49:15.000000000 +0200
@@ -10,7 +10,7 @@ from zipfile import (
     ZIP_STORED,
     ZIP_DEFLATED,
 )
-from collections import OrderedDict
+from ordereddict import OrderedDict
 from urlparse import urlparse, ParseResult
 import mozpack.path
 
@@ -94,8 +94,6 @@ class JarStruct(object):
             else:
                 size = sizes[t]
                 value = data[offset:offset + size]
-                if isinstance(value, memoryview):
-                    value = value.tobytes()
             if not name in sizes:
                 self._values[name] = value
             else:
@@ -122,8 +120,6 @@ class JarStruct(object):
         assert data is not None
         format, size = JarStruct.TYPE_MAPPING[type]
         data = data[:size]
-        if isinstance(data, memoryview):
-            data = data.tobytes()
         return struct.unpack('<' + format, data)[0], size
 
     def serialize(self):
@@ -261,12 +257,12 @@ class JarFileReader(object):
         the file data.
         '''
         assert header['compression'] in [JAR_DEFLATED, JAR_STORED]
-        self._data = data
         # Copy some local file header fields.
         for name in ['filename', 'compressed_size',
                      'uncompressed_size', 'crc32']:
             setattr(self, name, header[name])
         self.compressed = header['compression'] == JAR_DEFLATED
+        self._data = data[:header['compressed_size']]
 
     def read(self, length=-1):
         '''
@@ -316,9 +312,7 @@ class JarFileReader(object):
             return self._uncompressed_data
         data = self.compressed_data
         if self.compressed:
-            data = zlib.decompress(data.tobytes(), -MAX_WBITS)
-        else:
-            data = data.tobytes()
+            data = zlib.decompress(data, -MAX_WBITS)
         if len(data) != self.uncompressed_size:
             raise JarReaderError('Corrupted file? %s' % self.filename)
         self._uncompressed_data = BytesIO(data)
@@ -339,7 +333,7 @@ class JarReader(object):
             data = fileobj.read()
         else:
             data = open(file, 'rb').read()
-        self._data = memoryview(data)
+        self._data = buffer(data)
         # The End of Central Directory Record has a variable size because of
         # comments it may contain, so scan for it from the end of the file.
         offset = -CDIR_END_SIZE
@@ -661,8 +655,6 @@ class Deflater(object):
         self._data.write(data)
         if self.compress:
             if self._deflater:
-                if isinstance(data, memoryview):
-                    data = data.tobytes()
                 self._deflated.write(self._deflater.compress(data))
             else:
                 raise JarWriterError("Can't write after flush")
diff -up mozilla-esr24/python/mozbuild/mozpack/unify.py.python mozilla-esr24/python/mozbuild/mozpack/unify.py
--- mozilla-esr24/python/mozbuild/mozpack/unify.py.python	2013-09-11 05:22:49.000000000 +0200
+++ mozilla-esr24/python/mozbuild/mozpack/unify.py	2013-10-22 15:49:15.000000000 +0200
@@ -19,7 +19,7 @@ import mozpack.path
 import struct
 import os
 import subprocess
-from collections import OrderedDict
+from ordereddict import OrderedDict
 
 
 def may_unify_binary(file):
diff -up mozilla-esr24/rebase/ordereddict.py.python mozilla-esr24/rebase/ordereddict.py
--- mozilla-esr24/rebase/ordereddict.py.python	2013-10-22 15:49:15.000000000 +0200
+++ mozilla-esr24/rebase/ordereddict.py	2013-10-22 15:49:15.000000000 +0200
@@ -0,0 +1,127 @@
+# Copyright (c) 2009 Raymond Hettinger
+#
+# Permission is hereby granted, free of charge, to any person
+# obtaining a copy of this software and associated documentation files
+# (the "Software"), to deal in the Software without restriction,
+# including without limitation the rights to use, copy, modify, merge,
+# publish, distribute, sublicense, and/or sell copies of the Software,
+# and to permit persons to whom the Software is furnished to do so,
+# subject to the following conditions:
+#
+#     The above copyright notice and this permission notice shall be
+#     included in all copies or substantial portions of the Software.
+#
+#     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+#     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+#     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+#     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+#     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+#     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+#     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+#     OTHER DEALINGS IN THE SOFTWARE.
+
+from UserDict import DictMixin
+
+class OrderedDict(dict, DictMixin):
+
+    def __init__(self, *args, **kwds):
+        if len(args) > 1:
+            raise TypeError('expected at most 1 arguments, got %d' % len(args))
+        try:
+            self.__end
+        except AttributeError:
+            self.clear()
+        self.update(*args, **kwds)
+
+    def clear(self):
+        self.__end = end = []
+        end += [None, end, end]         # sentinel node for doubly linked list
+        self.__map = {}                 # key --> [key, prev, next]
+        dict.clear(self)
+
+    def __setitem__(self, key, value):
+        if key not in self:
+            end = self.__end
+            curr = end[1]
+            curr[2] = end[1] = self.__map[key] = [key, curr, end]
+        dict.__setitem__(self, key, value)
+
+    def __delitem__(self, key):
+        dict.__delitem__(self, key)
+        key, prev, next = self.__map.pop(key)
+        prev[2] = next
+        next[1] = prev
+
+    def __iter__(self):
+        end = self.__end
+        curr = end[2]
+        while curr is not end:
+            yield curr[0]
+            curr = curr[2]
+
+    def __reversed__(self):
+        end = self.__end
+        curr = end[1]
+        while curr is not end:
+            yield curr[0]
+            curr = curr[1]
+
+    def popitem(self, last=True):
+        if not self:
+            raise KeyError('dictionary is empty')
+        if last:
+            key = reversed(self).next()
+        else:
+            key = iter(self).next()
+        value = self.pop(key)
+        return key, value
+
+    def __reduce__(self):
+        items = [[k, self[k]] for k in self]
+        tmp = self.__map, self.__end
+        del self.__map, self.__end
+        inst_dict = vars(self).copy()
+        self.__map, self.__end = tmp
+        if inst_dict:
+            return (self.__class__, (items,), inst_dict)
+        return self.__class__, (items,)
+
+    def keys(self):
+        return list(self)
+
+    setdefault = DictMixin.setdefault
+    update = DictMixin.update
+    pop = DictMixin.pop
+    values = DictMixin.values
+    items = DictMixin.items
+    iterkeys = DictMixin.iterkeys
+    itervalues = DictMixin.itervalues
+    iteritems = DictMixin.iteritems
+
+    def __repr__(self):
+        if not self:
+            return '%s()' % (self.__class__.__name__,)
+        return '%s(%r)' % (self.__class__.__name__, self.items())
+
+    def copy(self):
+        return self.__class__(self)
+
+    @classmethod
+    def fromkeys(cls, iterable, value=None):
+        d = cls()
+        for key in iterable:
+            d[key] = value
+        return d
+
+    def __eq__(self, other):
+        if isinstance(other, OrderedDict):
+            if len(self) != len(other):
+                return False
+            for p, q in  zip(self.items(), other.items()):
+                if p != q:
+                    return False
+            return True
+        return dict.__eq__(self, other)
+
+    def __ne__(self, other):
+        return not self == other
diff -up mozilla-esr24/toolkit/mozapps/installer/find-dupes.py.python mozilla-esr24/toolkit/mozapps/installer/find-dupes.py
--- mozilla-esr24/toolkit/mozapps/installer/find-dupes.py.python	2013-09-11 05:22:55.000000000 +0200
+++ mozilla-esr24/toolkit/mozapps/installer/find-dupes.py	2013-10-22 15:49:15.000000000 +0200
@@ -5,7 +5,7 @@
 import sys
 import hashlib
 from mozpack.packager.unpack import UnpackFinder
-from collections import OrderedDict
+from ordereddict import OrderedDict
 
 '''
 Find files duplicated in a given packaged directory, independently of its