mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-06 16:56:55 +08:00
Bring in changes from WebRTC autoroller (2)
This adds support for GCS deps No-Try: True Bug: libyuv:358992053 Change-Id: I22fd87cf783faf2b0b35df108df6cfa1fb181657 Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/6105833 Reviewed-by: Mirko Bonadei <mbonadei@chromium.org> Commit-Queue: Jeremy Leconte <jleconte@google.com> Reviewed-by: Jeremy Leconte <jleconte@google.com>
This commit is contained in:
parent
318a1ad595
commit
13d5e11d38
@ -106,6 +106,7 @@ ChangedDep = collections.namedtuple(
|
|||||||
'ChangedDep', 'path url current_rev new_rev'
|
'ChangedDep', 'path url current_rev new_rev'
|
||||||
)
|
)
|
||||||
CipdDepsEntry = collections.namedtuple('CipdDepsEntry', 'path packages')
|
CipdDepsEntry = collections.namedtuple('CipdDepsEntry', 'path packages')
|
||||||
|
GcsDepsEntry = collections.namedtuple('GcsDepsEntry', 'path bucket objects')
|
||||||
VersionEntry = collections.namedtuple('VersionEntry', 'version')
|
VersionEntry = collections.namedtuple('VersionEntry', 'version')
|
||||||
ChangedCipdPackage = collections.namedtuple(
|
ChangedCipdPackage = collections.namedtuple(
|
||||||
'ChangedCipdPackage', 'path package current_version new_version'
|
'ChangedCipdPackage', 'path package current_version new_version'
|
||||||
@ -308,9 +309,13 @@ def BuildDepsentryDict(deps_dict):
|
|||||||
dep = {'url': dep}
|
dep = {'url': dep}
|
||||||
if dep.get('dep_type') == 'cipd':
|
if dep.get('dep_type') == 'cipd':
|
||||||
result[path] = CipdDepsEntry(path, dep['packages'])
|
result[path] = CipdDepsEntry(path, dep['packages'])
|
||||||
|
elif dep.get('dep_type') == 'gcs':
|
||||||
|
result[path] = GcsDepsEntry(path, dep['bucket'],
|
||||||
|
dep['objects'])
|
||||||
else:
|
else:
|
||||||
if '@' not in dep['url']:
|
if '@' not in dep['url']:
|
||||||
continue
|
url, revision = dep['url'], 'HEAD'
|
||||||
|
else:
|
||||||
url, revision = dep['url'].split('@')
|
url, revision = dep['url'].split('@')
|
||||||
result[path] = DepsEntry(path, url, revision)
|
result[path] = DepsEntry(path, url, revision)
|
||||||
|
|
||||||
@ -471,10 +476,17 @@ def CalculateChangedDeps(libyuv_deps, new_cr_deps):
|
|||||||
|
|
||||||
if isinstance(cr_deps_entry, CipdDepsEntry):
|
if isinstance(cr_deps_entry, CipdDepsEntry):
|
||||||
result.extend(
|
result.extend(
|
||||||
_FindChangedCipdPackages(
|
_FindChangedCipdPackages(path, libyuv_deps_entry.packages,
|
||||||
path, libyuv_deps_entry.packages, cr_deps_entry.packages # pylint: disable=line-too-long
|
cr_deps_entry.packages))
|
||||||
)
|
continue
|
||||||
)
|
|
||||||
|
if isinstance(cr_deps_entry, GcsDepsEntry):
|
||||||
|
result.extend(
|
||||||
|
_FindChangedVars(
|
||||||
|
path, ','.join(x['object_name']
|
||||||
|
for x in libyuv_deps_entry.objects),
|
||||||
|
','.join(x['object_name']
|
||||||
|
for x in cr_deps_entry.objects)))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if isinstance(cr_deps_entry, VersionEntry):
|
if isinstance(cr_deps_entry, VersionEntry):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user