From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web10.121.1593015182401806069 for ; Wed, 24 Jun 2020 09:13:02 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=qZrnEwpy; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: nathaniel.l.desimone@intel.com) IronPort-SDR: KXCQG6jySEc69xdVDehbvAOGqXxlJBAmPkYHLL7Hy4xS3bpCDX4ZaQ4tIgkyD1iLcrq3i7LoaS JN5ajcpWHwqw== X-IronPort-AV: E=McAfee;i="6000,8403,9662"; a="131960936" X-IronPort-AV: E=Sophos;i="5.75,275,1589266800"; d="scan'208";a="131960936" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jun 2020 09:13:00 -0700 IronPort-SDR: zVqrFBz4kbRf2wHlYtSViZ1eYcQ0Zqva8KwBVCJtnKKwi9H8WNwWrL86HcjI44pMy10lBvWWjy 1Nri5c+VKkVQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,275,1589266800"; d="scan'208";a="423423662" Received: from orsmsx103.amr.corp.intel.com ([10.22.225.130]) by orsmga004.jf.intel.com with ESMTP; 24 Jun 2020 09:13:00 -0700 Received: from orsmsx158.amr.corp.intel.com (10.22.240.20) by ORSMSX103.amr.corp.intel.com (10.22.225.130) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 24 Jun 2020 09:13:00 -0700 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by ORSMSX158.amr.corp.intel.com (10.22.240.20) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 24 Jun 2020 09:13:00 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.175) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 24 Jun 2020 09:13:00 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c7oFiWoMislYuYO+COrgqeO84PGHKFd08Z9KfGC67zwmkG+xr7YIFEONZezGQoktiK+lecV4o3Ox2S6zTDN2PaDEHaySj9AV0E5b+CfxukoFBE+5im7J3b1SNjNEA3QDnD3fGMQXcUWmFCdCDNBqC2G0gNXOXwoFSCJxSmA5LVT8Ju4EZSzno+q1v+XKOr5aLbGg/MMNVOHZVPIAtvTujexlyAhJtGzRTAB+xepABrxVFcTePDvj6Ef1Y0520NfWbQi4hk9zPBgCGtACIYxhzX73CpMGVCc4LSMpZo1rakUHr7iHvgiJk20N7QI3sn8sumJrggD+6Tv5ZigbRvJ5GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qs/dq2wMrGADYShVqDC5YqESCuQzYC4eJ+jPlB0Rnh4=; b=TQFUDF6bErB6vdI3+689c17n61XcWAVF4r/Gx4LmA5sRmjirNQ9nCuyXac4l8hR50rVzGu+WExe08WGHA4N5Ez3wdKOaS55VIGRWKi3qKcUP1JboSn9wJcc78sU7vIgcHWoNJWBBt3viFxMm6B6WoX/kr5ZvmCg5jA79MjL7inLvAFsprNZr237oJLkcaw/zMxp9shqkudvfCTu0rO3TF0ud5PBZXx7WPxlyTtCk/ktuQV8MnxHKFdseo7Jpk/WnyBpQk2vwGfo4xDTcFDrTKyI37mW6oKQHPkA/RgvLKxGdhu+4ot1El6wUx+pj6/ccmAGBPtA3VMyb0Tr7IU7pCA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qs/dq2wMrGADYShVqDC5YqESCuQzYC4eJ+jPlB0Rnh4=; b=qZrnEwpyAeYr77t36zpXR6823qbI7hM/E2UyO28B3fBfjr9NtgJpRiJ9sTtcPRrIIAa+m6R9Ri5hbANPFfk3FebzQbai3sVhNj2LRTg1RtB0K1omJ6okR0dTxBpbu41xcsy/Kpxf55Q75oH9VcDxtWx2kdcRKwmdk/taa+sncd0= Received: from MWHPR1101MB2160.namprd11.prod.outlook.com (2603:10b6:301:5b::12) by MWHPR11MB1245.namprd11.prod.outlook.com (2603:10b6:300:28::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20; Wed, 24 Jun 2020 16:12:58 +0000 Received: from MWHPR1101MB2160.namprd11.prod.outlook.com ([fe80::889c:c0bd:5262:7c80]) by MWHPR1101MB2160.namprd11.prod.outlook.com ([fe80::889c:c0bd:5262:7c80%8]) with mapi id 15.20.3131.020; Wed, 24 Jun 2020 16:12:58 +0000 From: "Nate DeSimone" To: "Desimone, Ashley E" , "devel@edk2.groups.io" CC: "Pandya, Puja" , "Bjorge, Erik C" , Bret Barkelew , "Agyeman, Prince" Subject: Re: [edk2-staging/EdkRepo] [PATCH] EdkRepo: EdkRepo Sync Fails to Update Local Manifest Thread-Topic: [edk2-staging/EdkRepo] [PATCH] EdkRepo: EdkRepo Sync Fails to Update Local Manifest Thread-Index: AQHWRpH32HhielTAxUu1aSF+sq6akajn925Q Date: Wed, 24 Jun 2020 16:12:58 +0000 Message-ID: References: <20200619233247.2184-1-ashley.e.desimone@intel.com> In-Reply-To: <20200619233247.2184-1-ashley.e.desimone@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZGQ3MmY4M2EtOGUwZS00MjRlLTk5NDAtZDg3ZDE5MGYxMjE1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiWSs0MlVYVHZ5Sm0zR0pocUdDSUtCTTYyOXA5dTUwZWt3ZXdvNkhLWWlnVSt5NlFXalI4TDM5SVJUMnVpWUJ3dCJ9 dlp-reaction: no-action dlp-version: 11.2.0.6 dlp-product: dlpe-windows x-ctpclassification: CTP_NT authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [134.134.136.221] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1cde4aa7-70cb-49d0-9215-08d818597615 x-ms-traffictypediagnostic: MWHPR11MB1245: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:281; x-forefront-prvs: 0444EB1997 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: HS9MO3wm10dL30k1iG9ORuH2bwD2bEXmvnIArMw6KQqslhT+iSOh5qUch/v4zIYZyZE3wzxMyoyC1/U8+u7lH2LfbWBnwyZLSSv8xuf1wwxvPv/jCXnARo7Exp+Y3FYaJUh7cdEt8E8lcNTCvCF6fm2aGLNLWwNs/tgRwToILKKewGxcaf9MytMEiDFYdVd2CN31nuiARcKIT1zogWYsQAf8bHt1h1DGbNCeQXiNWMvJCd6sPZYsxVovrd6g/WGR8IAKbbOmuGocgqVArzkPUKcvHTbfO//tgX54Su+klZ59y4OVuytZX5fHTpBHBhuenRWTBxMVoMkOF/kDlhO2sw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR1101MB2160.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(39860400002)(396003)(366004)(376002)(346002)(136003)(15650500001)(4326008)(54906003)(6506007)(110136005)(53546011)(33656002)(71200400001)(7696005)(9686003)(478600001)(2906002)(55016002)(8936002)(66946007)(52536014)(5660300002)(86362001)(186003)(76116006)(8676002)(316002)(26005)(66476007)(64756008)(66556008)(83380400001)(107886003)(66446008);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: 0yqcAOcaMOcKbHmoKyyMMJuJaQjA3aKGTH19+XDNDnoiJyV6ZiteIXqXSHG5lGO442Im+1VVwUgKS22ZEUn9a/hiLVta9fdLue7fEtn2aAqtwps2K5O5iZz6Awmn8V32oA4supmfpNjimO/CyzhW63U/s+6pTG12yuH9+aWd6tWyTuL2LwHgZdcgx+q3g+VzLesx734H97n+/Hv3SEb+C24GNcvfOZ7+swZQc6xNLJFSvePvK+DWcSy5jEAbQ5O+LtQLCytaroT2Cz3ZRiUVzGPXoXH+H/A5hxuQnyMyEf/aUolrTW32viqopQtbtgnFrwBkuSJc9zwKXKmSfcE3Slf7B3pQH6MYOSLJ6LlbRXwT9h3KVJuqFfxgJ6OC/h1WDa6NuZwt+IvLzZqH9tVUQMiLrv00hFsN5mKaOv+A+0fPZ8+9h9oySz6oPRbSglJIn77htZpG6flSM3HSTfxfVAJKC0QgRsNyz2Z4aQ0Kja3inaTSfrwbD3YZIwUn/899 MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR1101MB2160.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1cde4aa7-70cb-49d0-9215-08d818597615 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jun 2020 16:12:58.4366 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: tTHmHFPCueQGdBXm9bYC1vithmS7hUMBiFeBojcPLQpZ3yLN843eqBONCN6W6XQVudewlT6+5WFJ0fMDjI6r6NP6WmFRTIUL4t779+bPEIc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1245 Return-Path: nathaniel.l.desimone@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Nate DeSimone -----Original Message----- From: Desimone, Ashley E =20 Sent: Friday, June 19, 2020 4:33 PM To: devel@edk2.groups.io Cc: Desimone, Nathaniel L ; Pandya, Puja ; Bjorge, Erik C ; Bret Barke= lew ; Agyeman, Prince Subject: [edk2-staging/EdkRepo] [PATCH] EdkRepo: EdkRepo Sync Fails to Upda= te Local Manifest Only use the new manifests default combination if the current manifest is n= ot 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 --- 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 u= pdate_editor_config from edkrepo.common.common_repo_functions import updat= e_repo_commit_template, get_latest_sha from edkrepo.common.common_repo_fun= ctions import has_primary_repo_remote, fetch_from_primary_repo, in_sync_wit= h_primary -from edkrepo.common.common_repo_functions import update_hooks, c= ombinations_in_manifest+from edkrepo.common.common_repo_functions import up= date_hooks, combinations_in_manifest from edkrepo.common.common_repo_funct= ions import write_included_config, remove_included_config from edkrepo.com= mon.workspace_maintenance.workspace_maintenance import generate_name_for_ob= solete_backup from edkrepo.common.workspace_maintenance.manifest_repos_mai= ntenance import 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_workspace_manifest, get_edkrepo_glob= al_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, mainta= in_submodules+from project_utils.submodule import deinit_submodules, mainta= in_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 replaced 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(workspa= ce_path, initial_manifest, initial_combo,- man= ifest, current_combo, args.verbose)-+ # At this point both new and o= ld manifest files are ready so we can 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_templat= e(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, args.ver= bose)-+ # Initialize submodules + if not args.skip_submodule: + maintain_submodules(workspace_path, manifest,=20 + current_combo, args.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_re= pos(args, workspace_path, sources_to_clone, new_manifest_to_check.repo_hook= s, 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 [] -- 2.26.2.windows.1