gclient flatten: fix an issue with an deps_os entry getting added to deps

The previous code did not distinguish between None and [] value for orig_deps.

This could be triggered by not having any deps, but some entries in deps_os,
in which case these deps_os entries would get added by mistake to deps.

Bug: 570091
Change-Id: Id5b41e37ea717d5d00404694ad5bfce8df9da934
Reviewed-on: https://chromium-review.googlesource.com/558349
Reviewed-by: Michael Moss <mmoss@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
changes/49/558349/2
Paweł Hajdan, Jr 8 years ago committed by Commit Bot
parent 6014b56642
commit e015878d80

@ -827,12 +827,13 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
for dep in deps_to_add:
if dep.verify_validity():
self.add_dependency(dep)
for dep in (orig_deps_to_add or deps_to_add):
for dep in (orig_deps_to_add if orig_deps_to_add is not None
else deps_to_add):
self.add_orig_dependency(dep)
self._mark_as_parsed(
[Hook.from_dict(h, variables=self._vars) for h in hooks],
orig_hooks=[Hook.from_dict(h, variables=self._vars)
for h in orig_hooks or hooks])
for h in (orig_hooks if orig_hooks is not None else hooks)])
def findDepsFromNotAllowedHosts(self):
"""Returns a list of depenecies from not allowed hosts.

Loading…
Cancel
Save