From nobody Thu Apr 25 12:37:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+61541+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+61541+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1592609577; cv=none; d=zohomail.com; s=zohoarc; b=UZTS3uzO0sWY6Jq0cngaRb0SbKuX3OUU2/ppyCzEk8gnrkxYDPLoglZyROmDpt6EfPrjy0DyRbVT4byd7aVWqVjq6W/AsuGX9byER5lKuptgk19/a0xCmWUXGctsD/m08fONrZrBRyDK9j7VLb93hz5YEr7bJbTgsQkReyHS5oY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592609577; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=KoqeQgFb2DMyZBtp9ANIjN03xdrtJOCm3+QAIy/zh0A=; b=Yp88iiNEclJEvdNrMbcsoKFlk0F1eTmVIlqASHTGwbtYTqNDcIG+NITtclD5e+MSEphR7M15tIocWJIb12XPVLEolF90MguY8lRypj2EglOvXiXx2KI0qYYRIZxn4bzxo7ooGNQS+BOAZv1gM8BLn//EqD0064IzyIMU4UcX4aw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+61541+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1592609576970660.2417755850986; Fri, 19 Jun 2020 16:32:56 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id qxFSYY1788612xab1ilJ1m3L; Fri, 19 Jun 2020 16:32:56 -0700 X-Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web12.1683.1592609571686932723 for ; Fri, 19 Jun 2020 16:32:52 -0700 IronPort-SDR: 0eMUzrdNWicx+ykA1XWSkqSglI3E9Fua0+rvjLAUox8DXhTZeU21Ehb2ML5wML2MJ3SaYB4JBW yspu5qTsoE7Q== X-IronPort-AV: E=McAfee;i="6000,8403,9657"; a="204619307" X-IronPort-AV: E=Sophos;i="5.75,256,1589266800"; d="scan'208";a="204619307" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2020 16:32:50 -0700 IronPort-SDR: 0AvNLscbSGMqusTxNoDCBy2TfUmxnLSfVbvBBsprZ2csSnw3DFjMfWZTqZOy5K9otrK3OoMWXi MOW5OjpyqR6g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,256,1589266800"; d="scan'208";a="292273811" X-Received: from aedesimo-desk.amr.corp.intel.com ([10.212.26.9]) by orsmga002.jf.intel.com with ESMTP; 19 Jun 2020 16:32:49 -0700 From: "Ashley E Desimone" To: devel@edk2.groups.io Cc: Nate DeSimone , Puja Pandya , Erik Bjorge , Bret Barkelew , Prince Agyeman Subject: [edk2-devel] [edk2-staging/EdkRepo] [PATCH] EdkRepo: EdkRepo Sync Fails to Update Local Manifest Date: Fri, 19 Jun 2020 16:32:47 -0700 Message-Id: <20200619233247.2184-1-ashley.e.desimone@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ashley.e.desimone@intel.com X-Gm-Message-State: 1XpaXFRmVucRZJQAvsa6yOpNx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1592609576; bh=+QiNaUkfMqs45tIiKLOTTGnOvbVT23QyYHLzKTQrFDQ=; h=Cc:Date:From:Reply-To:Subject:To; b=ZggckcZwyPrmpPqOXgYo9+1q6Tg6RtMETNqWM4e8K/UKack8SuMcLcfDciIYEbqe+oF KZbwufLZrq+rRoAvTu73jCRa5f20mz3N35oVPhcWDThAB4Pz/A61c0GRLwC5ccfsf8vPF FvgoWsH844hyXqZfcBiGNiml7ZhQ8ujMRgU= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Only use the new manifests default combination if the current manifest is not present in the list of new combos Remove the extranous comparison of repo sources as that content is checked later in the function. Signed-off-by: Ashley E Desimone Cc: Nate DeSimone Cc: Puja Pandya Cc: Erik Bjorge Cc: Bret Barkelew Cc: Prince Agyeman Reviewed-by: Erik Bjorge Reviewed-by: Nate DeSimone --- edkrepo/commands/sync_command.py | 45 ++++++++++++++------------------ 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/edkrepo/commands/sync_command.py b/edkrepo/commands/sync_comma= nd.py index dd7202d..c87861b 100644 --- a/edkrepo/commands/sync_command.py +++ b/edkrepo/commands/sync_command.py @@ -38,7 +38,7 @@ from edkrepo.common.common_repo_functions import checkout= _repos, check_dirty_rep from edkrepo.common.common_repo_functions import update_editor_config from edkrepo.common.common_repo_functions import update_repo_commit_templa= te, get_latest_sha from edkrepo.common.common_repo_functions import has_primary_repo_remote, = fetch_from_primary_repo, in_sync_with_primary -from edkrepo.common.common_repo_functions import update_hooks, combination= s_in_manifest +from edkrepo.common.common_repo_functions import update_hooks, combination= s_in_manifest from edkrepo.common.common_repo_functions import write_included_config, re= move_included_config from edkrepo.common.workspace_maintenance.workspace_maintenance import gen= erate_name_for_obsolete_backup from edkrepo.common.workspace_maintenance.manifest_repos_maintenance impor= t pull_workspace_manifest_repo @@ -48,7 +48,7 @@ from edkrepo.common.ui_functions import init_color_console from edkrepo.config.config_factory import get_workspace_path, get_workspac= e_manifest, get_edkrepo_global_data_directory from edkrepo.config.config_factory import get_workspace_manifest_file from edkrepo_manifest_parser.edk_manifest import CiIndexXml, ManifestXml -from project_utils.submodule import deinit_submodules, maintain_submodules +from project_utils.submodule import deinit_submodules, maintain_submodules =20 =20 class SyncCommand(EdkrepoCommand): @@ -85,7 +85,7 @@ class SyncCommand(EdkrepoCommand): current_combo =3D initial_manifest.general_config.current_combo initial_sources =3D initial_manifest.get_repo_sources(current_comb= o) initial_hooks =3D initial_manifest.repo_hooks - initial_combo =3D current_combo + initial_combo =3D current_combo =20 source_global_manifest_repo =3D find_source_manifest_repo(initial_= manifest, config['cfg_file'], config['user_cfg_file'], args.source_manifest= _repo) pull_workspace_manifest_repo(initial_manifest, config['cfg_file'],= config['user_cfg_file'], args.source_manifest_repo, False) @@ -102,7 +102,7 @@ class SyncCommand(EdkrepoCommand): if not args.update_local_manifest: self.__check_for_new_manifest(args, config, initial_manifest, = workspace_path, global_manifest_directory) check_dirty_repos(initial_manifest, workspace_path) - + # Determine if sparse checkout needs to be disabled for this opera= tion sparse_settings =3D initial_manifest.sparse_settings sparse_enabled =3D sparse_checkout_enabled(workspace_path, initial= _sources) @@ -116,7 +116,7 @@ class SyncCommand(EdkrepoCommand): reset_sparse_checkout(workspace_path, initial_sources) =20 # Get the latest manifest if requested - if args.update_local_manifest: # NOTE: hyphens in arg name replac= ed with underscores due to argparse + if args.update_local_manifest: # NOTE: hyphens in arg name replac= ed with underscores due to argparse self.__update_local_manifest(args, config, initial_manifest, w= orkspace_path, global_manifest_directory) manifest =3D get_workspace_manifest() if args.update_local_manifest: @@ -130,12 +130,12 @@ class SyncCommand(EdkrepoCommand): repo_sources_to_sync =3D manifest.get_repo_sources(current_com= bo) manifest.write_current_combo(current_combo) =20 - # At this point both new and old manifest files are ready so we ca= n deinit any - # submodules that are removed due to a manifest update. - if not args.skip_submodule: - deinit_submodules(workspace_path, initial_manifest, initial_co= mbo, - manifest, current_combo, args.verbose) - + # At this point both new and old manifest files are ready so we ca= n deinit any + # submodules that are removed due to a manifest update. + if not args.skip_submodule: + deinit_submodules(workspace_path, initial_manifest, initial_co= mbo, + manifest, current_combo, args.verbose) + sync_error =3D False # Calculate the hooks which need to be updated, added or removed f= or the sync if args.update_local_manifest: @@ -205,15 +205,15 @@ class SyncCommand(EdkrepoCommand): print(NO_SYNC_DETACHED_HEAD.format(repo_to_sync.root)) =20 # Update commit message templates - update_repo_commit_template(workspace_path, repo, repo_to_sync= , config, global_manifest_directory) + update_repo_commit_template(workspace_path, repo, repo_to_sync= , config, global_manifest_directory) =20 if sync_error: print(SYNC_ERROR) =20 - # Initialize submodules - if not args.skip_submodule: - maintain_submodules(workspace_path, manifest, current_combo, a= rgs.verbose) - + # Initialize submodules + if not args.skip_submodule: + maintain_submodules(workspace_path, manifest, current_combo, a= rgs.verbose) + # Restore sparse checkout state if sparse_enabled: print(SPARSE_CHECKOUT) @@ -244,14 +244,9 @@ class SyncCommand(EdkrepoCommand): # the default combo initial_combos =3D combinations_in_manifest(initial_manifest) new_combos =3D combinations_in_manifest(new_manifest_to_check) - if (current_combo not in new_combos) or (set(new_combos) !=3D set(= initial_combos)): - if initial_manifest.get_repo_sources(current_combo) =3D=3D new= _manifest_to_check.get_repo_sources(new_manifest_to_check.general_config.de= fault_combo): - new_sources_for_current_combo =3D new_manifest_to_check.ge= t_repo_sources(new_manifest_to_check.general_config.default_combo) - new_sources =3D new_sources_for_current_combo - else: - # Since asymetric combinations are not supported error out= with an IMCOMPATIBLE_COMBO warning - print(SYNC_COMBO_CHANGE.format(current_combo, initial_mani= fest.project_info.codename)) - raise EdkrepoManifestChangedException(SYNC_INCOMPATIBLE_CO= MBO) + if current_combo not in new_combos: + new_sources_for_current_combo =3D new_manifest_to_check.get_re= po_sources(new_manifest_to_check.general_config.default_combo) + new_sources =3D new_sources_for_current_combo else: new_sources_for_current_combo =3D new_manifest_to_check.get_re= po_sources(current_combo) new_sources =3D new_manifest_to_check.get_repo_sources(current= _combo) @@ -335,7 +330,7 @@ class SyncCommand(EdkrepoCommand): print(path_to_source) if len(sources_to_remove) > 0: print(SYNC_REMOVE_LIST_END_FORMATTING) - clone_repos(args, workspace_path, sources_to_clone, new_manife= st_to_check.repo_hooks, config, new_manifest_to_check) + clone_repos(args, workspace_path, sources_to_clone, new_manife= st_to_check.repo_hooks, config, new_manifest_to_check) # Make a list of and only checkout repos that were newly clone= d. Sync keeps repos on their initial active branches # cloning the entire combo can prevent existing repos from cor= rectly being returned to their proper branch repos_to_checkout =3D [] --=20 2.26.2.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#61541): https://edk2.groups.io/g/devel/message/61541 Mute This Topic: https://groups.io/mt/74993900/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-