зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1481121: [release] Build bz2 mar's on mozilla-esr60; r=Callek
Differential Revision: https://phabricator.services.mozilla.com/D3811 --HG-- extra : rebase_source : 549ac804da6fbd01359bd15aaf928fd06ff22cab extra : histedit_source : 3b3ef722261d4a7bce33d9215b288ba366f38dee
This commit is contained in:
Родитель
02057f7793
Коммит
e60f19d241
|
@ -2714,9 +2714,12 @@ class Repackage(MachCommandBase):
|
|||
help='Mar binary path')
|
||||
@CommandArgument('--output', '-o', type=str, required=True,
|
||||
help='Output filename')
|
||||
def repackage_mar(self, input, mar, output):
|
||||
@CommandArgument('--format', type=str, default='lzma',
|
||||
choices=('lzma', 'bz2'),
|
||||
help='Mar format')
|
||||
def repackage_mar(self, input, mar, output, format):
|
||||
from mozbuild.repackaging.mar import repackage_mar
|
||||
repackage_mar(self.topsrcdir, input, mar, output)
|
||||
repackage_mar(self.topsrcdir, input, mar, output, format)
|
||||
|
||||
@CommandProvider
|
||||
class Analyze(MachCommandBase):
|
||||
|
|
|
@ -14,7 +14,7 @@ from application_ini import get_application_ini_value
|
|||
from mozbuild.util import ensureParentDir
|
||||
|
||||
|
||||
def repackage_mar(topsrcdir, package, mar, output):
|
||||
def repackage_mar(topsrcdir, package, mar, output, mar_format='lzma'):
|
||||
if not zipfile.is_zipfile(package) and not tarfile.is_tarfile(package):
|
||||
raise Exception("Package file %s is not a valid .zip or .tar file." % package)
|
||||
|
||||
|
@ -47,6 +47,8 @@ def repackage_mar(topsrcdir, package, mar, output):
|
|||
env = os.environ.copy()
|
||||
env['MOZ_FULL_PRODUCT_VERSION'] = get_application_ini_value(tmpdir, 'App', 'Version')
|
||||
env['MAR'] = mozpath.normpath(mar)
|
||||
if mar_format == 'bz2':
|
||||
env['MAR_OLD_FORMAT'] = '1'
|
||||
# The Windows build systems have xz installed but it isn't in the path
|
||||
# like it is on Linux and Mac OS X so just use the XZ env var so the mar
|
||||
# generation scripts can find it.
|
||||
|
|
|
@ -48,9 +48,19 @@ job-template:
|
|||
- repackage/base.py
|
||||
- repackage/win64_signed.py
|
||||
package-formats:
|
||||
by-build-platform:
|
||||
linux.*: [mar]
|
||||
linux4\b.*: [mar]
|
||||
macosx64\b.*: [mar, dmg]
|
||||
win32\b.*: [mar, installer]
|
||||
win64\b.*: [mar, installer]
|
||||
by-project:
|
||||
# Build bz2 mar's on try to excerise the code
|
||||
(mozilla-esr60|try):
|
||||
by-build-platform:
|
||||
linux.*: [mar, mar-bz2]
|
||||
linux4\b.*: [mar, mar-bz2]
|
||||
macosx64\b.*: [mar, mar-bz2, dmg]
|
||||
win32\b.*: [mar, mar-bz2, installer]
|
||||
win64\b.*: [mar, mar-bz2, installer]
|
||||
default:
|
||||
by-build-platform:
|
||||
linux.*: [mar]
|
||||
linux4\b.*: [mar]
|
||||
macosx64\b.*: [mar, dmg]
|
||||
win32\b.*: [mar, installer]
|
||||
win64\b.*: [mar, installer]
|
||||
|
|
|
@ -55,9 +55,19 @@ job-template:
|
|||
- repackage/base.py
|
||||
- repackage/win64_signed.py
|
||||
package-formats:
|
||||
by-build-platform:
|
||||
linux.*: [mar]
|
||||
linux4\b.*: [mar]
|
||||
macosx64\b.*: [mar, dmg]
|
||||
win32\b.*: [mar, installer]
|
||||
win64\b.*: [mar, installer]
|
||||
by-project:
|
||||
# Build bz2 mar's on try to excerise the code
|
||||
(mozilla-esr60|try):
|
||||
by-build-platform:
|
||||
linux.*: [mar, mar-bz2]
|
||||
linux4\b.*: [mar, mar-bz2]
|
||||
macosx64\b.*: [mar, mar-bz2, dmg]
|
||||
win32\b.*: [mar, mar-bz2, installer]
|
||||
win64\b.*: [mar, mar-bz2, installer]
|
||||
default:
|
||||
by-build-platform:
|
||||
linux.*: [mar]
|
||||
linux4\b.*: [mar]
|
||||
macosx64\b.*: [mar, dmg]
|
||||
win32\b.*: [mar, installer]
|
||||
win64\b.*: [mar, installer]
|
||||
|
|
|
@ -30,10 +30,6 @@ transforms = TransformSequence()
|
|||
task_description_schema = {str(k): v for k, v in task_description_schema.schema.iteritems()}
|
||||
|
||||
|
||||
def _by_platform(arg):
|
||||
return optionally_keyed_by('build-platform', arg)
|
||||
|
||||
|
||||
# shortcut for a string where task references are allowed
|
||||
taskref_or_string = Any(
|
||||
basestring,
|
||||
|
@ -67,12 +63,12 @@ packaging_description_schema = Schema({
|
|||
Optional('shipping-product'): task_description_schema['shipping-product'],
|
||||
Optional('shipping-phase'): task_description_schema['shipping-phase'],
|
||||
|
||||
Required('package-formats'): _by_platform([basestring]),
|
||||
Required('package-formats'): optionally_keyed_by('build-platform', 'project', [basestring]),
|
||||
|
||||
# All l10n jobs use mozharness
|
||||
Required('mozharness'): {
|
||||
# Config files passed to the mozharness script
|
||||
Required('config'): _by_platform([basestring]),
|
||||
Required('config'): optionally_keyed_by('build-platform', [basestring]),
|
||||
|
||||
# Additional paths to look for mozharness configs in. These should be
|
||||
# relative to the base of the source checkout
|
||||
|
@ -103,6 +99,14 @@ PACKAGE_FORMATS = {
|
|||
},
|
||||
'output': "target.complete.mar",
|
||||
},
|
||||
'mar-bz2': {
|
||||
'args': ['mar', "--format", "bz2"],
|
||||
'inputs': {
|
||||
'input': 'target{archive_format}',
|
||||
'mar': 'mar{executable_extension}',
|
||||
},
|
||||
'output': "target.bz2.complete.mar",
|
||||
},
|
||||
'dmg': {
|
||||
'args': ['dmg'],
|
||||
'inputs': {
|
||||
|
@ -166,7 +170,11 @@ def handle_keyed_by(config, jobs):
|
|||
for job in jobs:
|
||||
job = copy.deepcopy(job) # don't overwrite dict values here
|
||||
for field in fields:
|
||||
resolve_keyed_by(item=job, field=field, item_name="?")
|
||||
resolve_keyed_by(
|
||||
item=job, field=field,
|
||||
project=config.params['project'],
|
||||
item_name="?",
|
||||
)
|
||||
yield job
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче