Teach "fetch pdfium" about the checkout_configuration property.

Allow someone interested in checking out a subset of the PDFium source
to do so via:

fetch pdfium --checkout_configuration=small

Along the way, also add support for the target_os and target_os_only
properties, which are carried over from the Chromium fetch config.

Change-Id: I11153fe7cb828c748055328ab2b60224b665ae84
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3758798
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
changes/98/3758798/6
Lei Zhang 3 years ago committed by LUCI CQ
parent 6757d46962
commit b4a8efbe1d

@ -14,17 +14,27 @@ class PdfiumConfig(config_util.Config):
@staticmethod
def fetch_spec(props):
url = 'https://pdfium.googlesource.com/pdfium.git',
solution = {
'name': 'src',
'url': url,
'managed': False,
'custom_vars': {},
}
if props.get('checkout_configuration'):
solution['custom_vars']['checkout_configuration'] = props[
'checkout_configuration']
spec = {
'solutions': [solution],
}
if props.get('target_os'):
spec['target_os'] = props['target_os'].split(',')
if props.get('target_os_only'):
spec['target_os_only'] = props['target_os_only']
return {
'type': 'gclient_git',
'gclient_git_spec': {
'solutions': [
{
'name': 'pdfium',
'url': 'https://pdfium.googlesource.com/pdfium.git',
'managed': False,
},
],
},
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod

Loading…
Cancel
Save