Skip to content

Commit

Permalink
EdkRepo: Fix incorrect manifest change calculations
Browse files Browse the repository at this point in the history
In the sync -u flow only the repository defining characteristics
of a repo_source tuple should be used to determine whether the
initial and new source are the same. This change ensures that
only the remote name, url and local root are compared.

Fixes tianocore#135

Signed-off-by: Ashley E Desimone <[email protected]>
Reviewed-by: Kevin Sun <[email protected]>
  • Loading branch information
ashedesimone committed Mar 14, 2023
1 parent 85cb6a3 commit 7975b7f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions edkrepo/commands/sync_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,10 +326,12 @@ def __update_local_manifest(self, args, config, initial_manifest, workspace_path

self.__check_submodule_config(workspace_path, new_manifest_to_check, new_sources_for_current_combo)
# Check that the repo sources lists are the same. If they are not the same and the override flag is not set, throw an exception.
if not args.override and set(initial_sources) != set(new_sources):
initial_source_repos = set([(source.remote_name, source.remote_url, source.root) for source in set(initial_sources)])
new_source_repos = set([(source.remote_name, source.remote_url, source.root) for source in set(new_sources)])
if not args.override and initial_source_repos != new_source_repos:
raise EdkrepoManifestChangedException(SYNC_REPO_CHANGE.format(initial_manifest.project_info.codename))
elif args.override and set(initial_sources) != set(new_sources):
#get a set of repo source tuples that are not in both the new and old manifest
elif args.override and initial_source_repos != new_source_repos:
# get a set of repo source tuples that are not in both the new and old manifest
uncommon_sources = []
initial_common = []
new_common = []
Expand Down

0 comments on commit 7975b7f

Please sign in to comment.