Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: packagerGecko.py

Issue 29333368: Issue 3498 - Improve file mapping / skipping logic (Closed)
Patch Set: Fixed typo in Gecko packager Created Jan. 13, 2016, 11:10 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « packagerChrome.py ('k') | packagerSafari.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packagerGecko.py
diff --git a/packagerGecko.py b/packagerGecko.py
index 748bf2810e47663e26e9907c8dbdcfc47aeaff91..39d2cb8c750184cab9da0618ec2ac966a9872f75 100644
--- a/packagerGecko.py
+++ b/packagerGecko.py
@@ -338,15 +338,16 @@ def createBuild(baseDir, type="gecko", outFile=None, locales=None, buildNum=None
'multicompartment': multicompartment,
}
+ mapped = metadata.items('mapping') if metadata.has_section('mapping') else []
+ skip = [opt for opt, _ in mapped] + ['chrome']
files = Files(getPackageFiles(params), getIgnoredFiles(params),
process=lambda path, data: processFile(path, data, params))
files['install.rdf'] = createManifest(params)
- if metadata.has_section('mapping'):
- files.readMappedFiles(metadata.items('mapping'))
- files.read(baseDir, skip=('chrome'))
+ files.readMappedFiles(mapped)
+ files.read(baseDir, skip=skip)
for name, path in getChromeSubdirs(baseDir, params['locales']).iteritems():
if os.path.isdir(path):
- files.read(path, 'chrome/%s' % name)
+ files.read(path, 'chrome/%s' % name, skip=skip)
importLocales(params, files)
fixupLocales(params, files)
if not 'bootstrap.js' in files:
« no previous file with comments | « packagerChrome.py ('k') | packagerSafari.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld