Print names of added/removed packages in case a manual DEPS update is needed.

Bug: None
Change-Id: I8ed37d8c2162c6077a7851ac352df0e8a1bb7eba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227038
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34588}
This commit is contained in:
Björn Terelius 2021-07-28 15:26:30 +02:00 committed by WebRTC LUCI CQ
parent 96e3b991da
commit 17939f430c

View file

@ -283,11 +283,18 @@ def BuildDepsentryDict(deps_dict):
def _FindChangedCipdPackages(path, old_pkgs, new_pkgs):
pkgs_equal = ({p['package'] for p in old_pkgs
} == {p['package'] for p in new_pkgs})
old_pkgs_names = {p['package'] for p in old_pkgs}
new_pkgs_names = {p['package'] for p in new_pkgs}
pkgs_equal = (old_pkgs_names == new_pkgs_names)
added_pkgs = [p for p in new_pkgs_names if p not in old_pkgs_names]
removed_pkgs = [p for p in old_pkgs_names if p not in new_pkgs_names]
assert pkgs_equal, ('Old: %s\n New: %s.\nYou need to do a manual roll '
'and remove/add entries in DEPS so the old and new '
'list match.' % (old_pkgs, new_pkgs))
'list match.\nMost likely, you should add \"%s\" and '
'remove \"%s\"' %
(old_pkgs, new_pkgs, added_pkgs, removed_pkgs))
for old_pkg in old_pkgs:
for new_pkg in new_pkgs:
old_version = old_pkg['version']