Commit b4a8efbe authored by Lei Zhang's avatar Lei Zhang Committed by LUCI CQ

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: 's avatarAravind Vasudevan <aravindvasudev@google.com>
parent 6757d469
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment