Граф коммитов

58 Коммитов

Автор SHA1 Сообщение Дата
Kris Maglione 9b633c92ac Bug 1457321: Part 4 - Update built-in add-ons manifst during l10n repack. r=ted f=pike
This is slightly ugly, but is unfortunately necessary due to do the nature of
l10n repacks. Hopefully this can go away once we move to bundling lancpack
add-ons rather than repacking in the future.

MozReview-Commit-ID: JZUblVsEbZI

--HG--
extra : rebase_source : 60c9ced2184a52f52c7f2a8820021b14b1a66abf
2018-05-08 01:04:01 -07:00
Kris Maglione e2fecdd542 Bug 1457321: Part 2 - Add dictionaries to omnijar. r=ted
MozReview-Commit-ID: 4zqD8Di7Imb

--HG--
extra : rebase_source : 2fdf8d1429ed1de6c86fc9dc880af2aadcc2b84b
2018-04-27 15:43:38 -07:00
Zibi Braniecki 634e419761 Bug 1415432 - .ftl files repackaged multiple times. r=glandium 2017-11-07 22:16:16 -08:00
Zibi Braniecki c15f333a09 Bug 1413985 - Package .ftl files on repackage for both, source and AB_CD locales. r=glandium
When repackaging, we want to take all localization resources from the source package,
and add all localization resources from the repackage target locale.

This patch makes packager.l10n scan for `localization` directories in l10n_finder and
add them.

MozReview-Commit-ID: CRLP3bOAyDx

--HG--
extra : rebase_source : 3b1bc098aaed2481a1cc06fc86d0865e654a1b6e
2017-11-02 12:10:26 -07:00
Mike Hommey 45680ab0c7 Bug 1352595 - Add basic support for brotli compression to the packager. r=gps
Bug 1355661 added support for brotli streams in "jar" files handled by
Gecko, and bug 1355671 made us build the `bro` command line utility that
allows to compress and decompress brotli streams.

This change uses the `bro` command line utility in the packager so that
it can create and handle "jar" files using brotli streams.

However, the `bro` command line utility is not available to l10n
repacks. As, at the moment, we're only hoping that the outcome of using
brotli will be good, we avoid doing all the work to make those work and
just hook things enough to enable brotli, while ensuring l10n repacks
don't break. This involves forcing some files to be deflated, and to
disable some optimizations from the packager.

Things will need to be figured out more properly if the experiment
proves brotli to be worthwhile.

--HG--
extra : rebase_source : a2e0cff67dcaed465fd441ed5d2a7de94b6351c5
2017-08-18 05:37:18 +09:00
Chung-Sheng Fu e5b80e9a8f Bug 863246 - Move resources that need to be exposed to web content to locations that are marked as contentaccessible r=billm
MozReview-Commit-ID: ArhSHKPYOr8

--HG--
extra : rebase_source : 888f7ce8f9db809ad5abbe6340af74e9dfb1d73b
2017-06-08 17:52:46 +08:00
Sebastian Hengst 2e163c99b1 Backed out changeset 1bfbae351dd7 (bug 863246) 2017-08-25 16:43:44 +02:00
Chung-Sheng Fu bb279d6d5e Bug 863246 - Move resources that need to be exposed to web content to locations that are marked as contentaccessible r=billm
MozReview-Commit-ID: ArhSHKPYOr8

--HG--
extra : rebase_source : b0cf8d159ba6bfa6e7bcd9528ae2f9851185ac30
2017-06-08 17:52:46 +08:00
Zibi Braniecki 0c7d3529d7 Bug 1333980 - Introduce L10nRegistry.jsm. r=mossop
This patch introduces a new registry for localization resources to replace
ChromeRegistry. It uses asynchronous I/O and iterators to generate
permutations of possible sources of language resources for use in the new
Localization API.

In the initial form the API handles packages resources and has API for
interacting with the AddonsManager which will report language packs.

MozReview-Commit-ID: LfERDYMROh

--HG--
extra : rebase_source : 68a664c2c59a82b4dfcae66542c315a00ddae565
2017-06-02 10:36:08 +02:00
Wes Kocher a27358fe6a Backed out changeset 3cb5dfb73fa3 (bug 1333980) for browser_all_files_referenced.js failures a=backout
MozReview-Commit-ID: 8dZ1lcv6p9V
2017-08-08 13:52:23 -07:00
Zibi Braniecki c41553945d Bug 1333980 - Introduce L10nRegistry.jsm. r=mossop
This patch introduces a new registry for localization resources to replace
ChromeRegistry. It uses asynchronous I/O and iterators to generate
permutations of possible sources of language resources for use in the new
Localization API.

In the initial form the API handles packages resources and has API for
interacting with the AddonsManager which will report language packs.

MozReview-Commit-ID: LfERDYMROh

--HG--
extra : rebase_source : a6e5b790142e5afb1ce750478190e5ad87012f8d
2017-06-02 10:36:08 +02:00
Mike Hommey 74f132e11e Bug 1365419 - Fixup l10n packager after bug 780562. r=gps
The change to l10n packager from bug 780562 worked in practice because
no chrome category had exclusively manifest entries with flags, which
we're changing in this bug.

It turns out this was only due to a missing change in the patch for bug
780562.

--HG--
extra : rebase_source : 9f782e115f97063c97f165ed95eb4beeb72f86d0
2017-05-26 11:24:40 +09:00
Wes Kocher 9782406dd8 Backed out 4 changesets (bug 1365419) for android mochitest failures in test_bug583533.html a=backout
Backed out changeset d82aa6aec2c1 (bug 1365419)
Backed out changeset 9aafdd1ca0bd (bug 1365419)
Backed out changeset 261eecf8497f (bug 1365419)
Backed out changeset 1d9b50fadc05 (bug 1365419)

MozReview-Commit-ID: HkhXf1Dkkbk
2017-06-01 18:39:21 -07:00
Mike Hommey a95e3eb0b4 Bug 1365419 - Fixup l10n packager after bug 780562. r=gps
The change to l10n packager from bug 780562 worked in practice because
no chrome category had exclusively manifest entries with flags, which
we're changing in this bug.

It turns out this was only due to a missing change in the patch for bug
780562.

--HG--
extra : rebase_source : 3c8c31c37d8fb48bb99b1758bcd8ef5f32c71fe0
2017-05-26 11:24:40 +09:00
Mike Hommey b860fe5648 Bug 1366729 - Skip manifest entries that are packaged twice. r=gps
--HG--
extra : rebase_source : 0db515433e1e5dacaf6be0c0921af060c3ad644d
2017-05-23 08:00:15 +09:00
Mike Hommey ae2d9aa982 Bug 1366729 - Properly handle "multi-content" manifest entries after bug 1366169. r=gps
Some manifest entries (e.g. skin or locale) have an attached identifier,
and there can be different entries with different identifiers for the
same chrome name. The change from bug 1366169 would consider those as
errors, while they are the expected configuration.

--HG--
extra : rebase_source : ceb08da909121a2ac0a2cdaba7970e4594dde09f
2017-05-23 07:51:22 +09:00
Chris AtLee 5fa1f81924 Bug 1351071: Get rid of pre-generated startup cache r=glandium
MozReview-Commit-ID: BcWcqEKwGBv

--HG--
extra : source : 0f320509eddb30fdefd00d17179670381c3b6f78
2017-04-04 09:26:25 -04:00
Mike Hommey d1b2f93802 Bug 1366169 - Avoid reordered manifest entries creating unexpected overrides. r=gps
As described in changeset c94e87a18096, chrome manifest entries are
reordered and don't necessarily appear in the order they have in jar.mn.

And in some cases, the order does matter: when entries with flags are
followed by entries with more broad flags or no flags at all. Nobody
should be writing entries in that order on purpose, so error out during
packaging when we detect the pattern.

--HG--
extra : rebase_source : d9617bbcbd8560503c532a13c10c8afb0fd49411
2017-05-19 15:01:58 +09:00
Mike Hommey c3680170a7 Bug 780562 - Take locale chrome manifest flags into account when repacking l10n. r=gps
--HG--
extra : rebase_source : 5185b078260f0445cfe77f0416230c9ab0781f8b
2017-05-09 14:23:55 +09:00
Carsten "Tomcat" Book b47fe0286b Backed out changeset 0f320509eddb (bug 1351071) for slowness 2017-05-09 16:58:19 +02:00
Chris AtLee b7af545070 Bug 1351071: Get rid of pre-generated startup cache r=glandium
MozReview-Commit-ID: BcWcqEKwGBv

--HG--
extra : rebase_source : 4bd21805a89359a5a2ed7ffd2ee2b76cf1e9e634
2017-04-04 09:26:25 -04:00
Mike Hommey dc5d1e6adf Bug 1335309 - Change the default for find_executables to False. r=mshal
Back when the class was written, for the packaging code, it made sense
that the default was True. But now that it's used all over the place,
and that the vast majority of uses are with find_executables=False, it
makes more sense for that to be the default.

--HG--
extra : rebase_source : ff813735fc0d53093f348f20eb77ee03e9b09d4e
2017-01-31 14:06:15 +09:00
Mike Hommey dbdbf959b8 Bug 1335309 - Add explicit find_executables arguments to every use of FileFinder. r=mshal
And make it an error not to give it. While the default is True, we do
pass a value of False wherever it makes sense, which happens to be, in
most places.

This is an intermediate step to flip the default from True to False,
ensuring that we don't unwantedly switch some calls to False.

--HG--
extra : rebase_source : 432e03f032fef378af482581685583262e5d2661
2017-01-31 13:01:34 +09:00
aleth bb41ac3b46 Bug 1311122 - Ensure missing file errors get reported despite missing base path in l10n.py. r=glandium
--HG--
extra : rebase_source : 1171410b3a6df675c3551c694748202176e42cbf
2016-10-18 21:06:36 +02:00
aleth b8af6b7271 Bug 1311136 - Improve 'multiple locales' error message in l10n.py. r=glandium
--HG--
extra : rebase_source : f46d5120f962380f989ebd115cc44c08ef858eb8
2016-10-18 21:52:19 +02:00
Mike Hommey 94ad81b0b0 Bug 1295542 - Ensure at least an empty chrome.manifest next to each omnijar file. r=gps 2016-09-20 13:43:54 +09:00
Chris Manchester 309a20b1c8 Bug 1240134 - Re-factor UnpackFinder to contain a Finder instance it delegates to rather than inheriting from FileFinder. r=glandium
MozReview-Commit-ID: LKYCROED06S
2016-08-17 15:02:31 -07:00
Chris AtLee e1b0b79d4d Bug 1275998 - L10n repacks should use the same compression settings for omni.ja as en-US r=glandium
MozReview-Commit-ID: DwuERh5MjX7

--HG--
extra : rebase_source : f447a41ebe48ab075327e0c0f8372d72976b6333
2016-05-27 08:37:09 -04:00
Mike Hommey f485401df4 Bug 1226884 - Keep em:unpack addons unpacked after bug 1216371. r=gps
--HG--
extra : amend_source : 61a2914b964df0bdf1d523e7eb396b54403daa9f
2015-11-23 22:40:00 +01:00
Mike Hommey b6d285f055 Bug 1216371 - Pack addons that can be packed as XPIs. r=gps 2015-11-19 08:05:51 +09:00
Mike Hommey 3657509c31 Bug 1216371 - Distinguish between addons that can be packed and those that cannot in the packager. r=gps 2015-11-19 08:05:51 +09:00
Mike Hommey 01f29630c8 Bug 1216371 - Use the PiecemealFormatter for the OmniJarFormatter. r=gps 2015-11-19 08:05:51 +09:00
Mike Hommey b13fb564e4 Bug 1216371 - Use the PiecemealFormatter for the JarFormatter. r=gps 2015-11-19 08:05:51 +09:00
Mike Hommey 96f591ed3f Bug 1216371 - Introduce a PiecemealFormatter base package formatter. r=gps
FlatFormatter, JarFormatter and OmniJarFormatter all, in some way, deal
with different pieces of the package being handled differently.

Instead of each of them dealing with their different pieces in some subtly
different way, instead, introduce a new base package formatter class that
will handle it for all of them.

Use this new PiecemealFormatter for the FlatFormatter.
2015-11-19 08:05:51 +09:00
Mike Hommey f7a0e3118a Bug 1216371 - Don't assume the root directory is a base directory in packager formatters. r=gps 2015-11-19 08:05:51 +09:00
Mike Hommey 67e9068329 Bug 1216371 - Add tests for *Formatter.contains(). r=gps
And fix OmniJarFormatter.contains after bug 910660.
2015-11-19 08:05:51 +09:00
Gregory Szorc c83528e0f4 Bug 1176642 - Use absolute_import in mozpack; r=glandium
--HG--
extra : commitid : Au8BOB8l869
extra : rebase_source : 2acf6d1df5b8d15261873f67a8b95ee018df3d0c
2015-06-25 12:13:55 -07:00
Mike Hommey 15e312dd82 Bug 1147207 - Use SimplePackager code to find manifest entries and base directories during l10n repack. r=gps
This avoids duplicating the logic from SimplePackager to find base
directories, and fixes some cases where the l10n repack code wouldn't
find them properly.
2015-04-01 13:52:07 +09:00
Mike Hommey c60d8adb58 Backout changeset 685aa4dfe753 (bug 1147207) for build bustage 2015-03-31 13:18:39 +09:00
Mike Hommey 082f551b9a Bug 1147207 - Allow to give extra l10n directories to l10n-repack.py. r=gps
This allows to use separate l10n staging directories for e.g. addons.
2015-03-31 12:32:53 +09:00
Mike Hommey 566e06c758 Bug 1147207 - Improve SimplePackager manifest consistency check. r=gps
Bug 910660 added a consistency check that rejects cases where a manifest
inside a directory detected as being the base of an addon is included from
outside the addon. Unfortunately, this triggered false positives when
a manifest is included from within the addon, but just happens to be at
the top-level of that addon.
2015-03-31 12:32:52 +09:00
Mike Hommey 5bbf16d22b Bug 1147207 - Use SimplePackager code to find manifest entries and base directories during l10n repack. r=gps
This avoids duplicating the logic from SimplePackager to find base
directories, and fixes some cases where the l10n repack code wouldn't
find them properly.
2015-03-31 12:32:52 +09:00
Mike Hommey 525ae5030d Bug 1147283 - Replace mozpack.path with mozpath. r=mshal
Back when mozpack.path was added, it was used as:

  import mozpack.path
  mozpack.path.func()

Nowadays, the common idiom is:

  import mozpack.path as mozpath
  mozpath.func()

because it's shorter.

$ git grep mozpath\\. | wc -l
423
$ git grep mozpack.path\\. | wc -l
123

This change was done with:
$ git grep -l mozpack.path\\. | xargs sed -i 's/mozpack\.path\./mozpath./g'
$ git grep -l 'import mozpack.path$' | xargs sed -i 's/import mozpack.path$/\0 as mozpath/'
$ (pat='import mozpack.path as mozpath'; git grep -l "$pat" | xargs sed -i "1,/$pat/b;/$pat/d")
2015-03-27 08:13:16 +09:00
Mike Hommey 2648f538a1 Bug 1147217 - Improve l10n repack error message when locale doesn't contain necessary files. r=mshal 2015-03-27 08:13:04 +09:00
Mike Hommey 3bf6773d2f Bug 910660 - Make the SimplePackager emit a separate base for addons. r=gps
Addons are detected by the presence of an install.rdf file in their base.
2015-03-24 09:10:33 +09:00
Mike Hommey 3a5298d3ca Bug 910660 - Make package formatters handle addons. r=gps
Addons are always formatted with jars for omnijar and jar packaging, and
flat for flat packaging.
2015-03-24 09:10:33 +09:00
Mike Hommey 0ca5f49005 Bug 910660 - Add a test for the unpacker code. r=gps 2015-03-24 09:10:32 +09:00
Mike Hommey a470038314 Bug 935305 - Move preprocessor to mozbuild.action. r=gps
--HG--
rename : config/Preprocessor.py => python/mozbuild/mozbuild/preprocessor.py
rename : config/tests/unit-Expression.py => python/mozbuild/mozbuild/test/test_expression.py
rename : config/tests/unit-LineEndings.py => python/mozbuild/mozbuild/test/test_line_endings.py
rename : config/tests/unit-Preprocessor.py => python/mozbuild/mozbuild/test/test_preprocessor.py
2013-11-09 10:35:44 +09:00
Mike Hommey e5c1aa4f98 Bug 934334 - Fix packager's jar chrome formatter to handle resource:// urls. r=gps 2013-11-07 10:37:45 +09:00
Mike Hommey 6f4872e2a3 Bug 893976 - Use (cached) regular expressions for mozpack.path.match. r=gps 2013-07-30 08:57:27 +09:00