author Mike Hommey <>
Wed, 06 Mar 2013 07:28:41 +0100
changeset 132320 9d56b37f1749567f4363b74e9978d777ae378e6b
parent 132319 d2e33291adcd4716a8f5b0084cb32d9967c9be4a
child 153797 7e0472b0e361139711ff9ae6270520112d0a66c5
permissions -rw-r--r--
Bug 846740 - Treat chrome searchplugins as non-chrome when doing l10n-repack. r=gps, a=bajaj

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at

Replace localized parts of a packaged directory with data from a langpack

from mozpack.packager import l10n
from argparse import ArgumentParser
import buildconfig

# Set of files or directories not listed in a chrome.manifest but that are
# localized.
NON_CHROME = set([

def main():
    parser = ArgumentParser()
                        help='Directory containing the build to repack')
                        help='Directory containing the staged langpack')
    parser.add_argument('--non-resource', nargs='+', metavar='PATTERN',
                        help='Extra files not to be considered as resources')
    args = parser.parse_args()

    buildconfig.substs['USE_ELF_HACK'] = False
    buildconfig.substs['PKG_SKIP_STRIP'] = True
    l10n.repack(, args.l10n, args.non_resource, NON_CHROME)

if __name__ == "__main__":